tags:

views:

72

answers:

1

Because I cant get this working: http://stackoverflow.com/questions/3250572/python-keyerror-with-form-getfirst

I have an alternative option, I have a function in DTML which needs to obtain a URL:

For example if the dtml webpage is located at

www.blah.com/foo/foo2?variable=55

How would i obtain the URL of this page using a python function?

The function is called by:

<dtml-var test>

The syntax for "test" is rite, the Zope documentation says so.

+1  A: 

for: http://www.blah.com/foo/foo2?job_ID=55555&amp;test=1

<dtml-var URL> = http://www.blah.com/foo/foo2

<dtml-var QUERY_STRING> = job_ID=55555&test=1

<dtml-var "REQUEST['job_ID']"> = 55555

See: http://wiki.zope.org/zope2/REQUESTX

tomvon