tags:

views:

47

answers:

2

I have a dtml page, which calls a function, with this code:

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

But i get a key error? stating "KeyError: "public_blast(form.getfirst('job_ID'))" ". I can see the job_ID variable at the top of the page. So i know it is being passed to the URL.

I cant see where im going wrong?

A: 

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'))">
Daniel Roseman
Just get a NameError: Name form is not defined
Harpal
A: 

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

tomvon