[ZPT] Re: ZPT, ZSQL Method and Python script
Dr_w
dr_w at macunlimited.net
Sat May 10 09:53:09 EDT 2003
Thanks for this. The script is now calling the Z SQL method and inserting
the data.
However, I'm not sure how to call the receipt page. The python script
returns a reference to the page template but not the page template itself.
The relevant code is:
return container.updateDB_rcpt
How can I get a rendered page rather than a reference
<ZopePageTemplate at updateDB_rcpt>?
Yours
James
ps. I could do this without thought in PHP but want to try Zope because (in
theory) Zope looks so much more straightforward!
--------- Original message --------
From: Evan Simpson <evan at 4-am.com>
To: zpt at zope.org <zpt at zope.org>
Subject: [ZPT] Re: ZPT, ZSQL Method and Python script
Date: 05-09-03 19:28
> James G. Webster wrote:
> happening in the script of the Z SQL method. I'm passing the
> parameters to the SQL method as "request['foo'],request['bar'].
Unless you are passing a single object that contains all of your data,
you need to use named parameters or none at all with Z SQL Methods.
If your parameters are actually 'foo' and 'bar', and are coming from the
request, you can simply write:
mySqlMethod()
....since in this case it will automatically look for parameters in
REQUEST. If you need to massage/substitute parameter values, you use:
mySqlMethod(foo=32, bar=REQUEST['bar'])
Cheers,
Evan @ 4-am
_______________________________________________
ZPT mailing list
ZPT at zope.org
http://mail.zope.org/mailman/listinfo/zpt
______________________________________________
This email was sent online by
macunlimited.net
The UK's mac dedicated service provider
More information about the ZPT
mailing list