passing form variables to ext. method
Hello again, Since I've beeen unsuccessful getting INSERT statements to work with PoPyDA/Zope/PostgerSQL, I've decided to use a web-form and an external method to process the form variable=value pairs. The python script works fine when I hardcode the values and run it from the command line, but trying chokes trying to get the query string (REQUEST) when called from a dtml document's form. I've been banging on it far too long and haven't found any documentation which has helped clear up the problem, so if anyone could point me in the right direction or send a code snippet to the mailing list, I'll thank you greatly. Thanks, Matt matt@bitflip.com
Matt Hand wrote:
Hello again,
Since I've beeen unsuccessful getting INSERT statements to work with PoPyDA/Zope/PostgerSQL, I've decided to use a web-form and an external method to process the form variable=value pairs.
The python script works fine when I hardcode the values and run it from the command line, but trying chokes trying to get the query string (REQUEST) when called from a dtml document's form.
I've been banging on it far too long and haven't found any documentation which has helped clear up the problem, so if anyone could point me in the right direction or send a code snippet to the mailing list, I'll thank you greatly.
Thanks, Matt matt@bitflip.com
First what is the snippet that is choking? Second, can you run the same insert interactively in the database connection's Test tab (if you can't then you may have a permission problem?) We do _alot_ of zope & postgresql integration with no problems, so don't give up too easily. -- Tom Jenkins devIS - Development Infostructure http://www.devis.com
Matt Hand writes:
Since I've beeen unsuccessful getting INSERT statements to work with PoPyDA/Zope/PostgerSQL, I've decided to use a web-form and an external method to process the form variable=value pairs. Not sure, I understand what you external method should do....
But Zope decodes the form "variable=value" pairs for you. The result is in "REQUEST.form" (a mapping from variables to values).
The python script works fine when I hardcode the values and run it from the command line, but trying chokes trying to get the query string (REQUEST) when called from a dtml document's form. The query string is "QUERY_STRING" not "REQUEST"...
Dieter
participants (3)
-
Dieter Maurer -
Matt Hand -
Tom Jenkins