Skip to content Skip to sidebar Skip to footer

Python: Keyerror With Form.getfirst

I have a dtml page, which calls a function, with this code: But i get a key error? stating KeyError: 'public_blast(form.getf

Solution 1:

It's been a very long time since I did any DTML, but I don't think you can call Python functions directly like that inside a DTML tag.

Instead I think you need to use the expr attribute:

<dtml-var expr="public_blast(form.getfirst('job_ID'))">

Solution 2:

Try <dtml-var "REQUEST['job_ID']">

Post a Comment for "Python: Keyerror With Form.getfirst"