[ZPT] ZPT, ZSQL Method and Python script

James G. Webster jgw at wincoll.ac.uk
Fri May 9 11:59:13 EDT 2003


I hope that this is not the wrong place for this inquiry.  Page Templates are involved but perhaps not centrally.

Having played around with page templates for a while, I thought it was time actually to do something real world and learn how to put together a small app which would add data to a SQL database.

I've got a PT which displays a form for entering the data.  The form action is set to a python script which *should* call a Z SQL method, passing it the two parameters which should then be inserted into the database.  The script should then return a PT set up as a receipt page.

However, when I submit the form, I get a message which tells me that the form variable is not recognised.  I'm not sure whether this is happening in the script of the Z SQL method.  I'm passing the parameters to the SQL method as "request['foo'],request['bar'].

I'd like to know how I can get these three objects to play together.

Many thanks

James

ps.  I know that I ought to put the code, but I don't have it here at work.




More information about the ZPT mailing list