On Mon, 07 Mar 2005 04:02:10 +0100, Henk Jansen <burley@zonnet.nl> wrote:
I have two problems when I want for pass <FORM ...> information into a Python Script:
1) Besides passing the FORM data, I also need to pass an extra argument into the Python script that was passed (as <URL>?arg=argval) by the URL. A thing like:
<FORM action=my_py_script(arg=<dtml-var argval>)
doesn't work. Neither does:
<FORM action="my_py_script(arg=<dtml-var argval>")
What's the proper syntax for passing extra arguments to a Python script in a FORM action?
Use an <input type="hidden"> field.
2) How do I access the FORM data in a Python script? I've tried "import cgi" but a call to cgi.FieldStorage() was met by a message that I wasn't authorized to make this call ...
REQUEST.form['var'] iirc. -- Phillip Hutchings http://www.sitharus.com/ sitharus@gmail.com / sitharus@sitharus.com