RE: [Zope] Passing Arguments to ZSQL Method from Python Script
Calling a zsql method from a python script does use request. At least I have the following in a script: context.sql_wo() sql_wo being a zsql method requiring two parameters that are in the form portion of request. Scott -----Original Message----- From: Chris A. Bruce [mailto:cbruce@sleeter.com] Sent: Wednesday, September 25, 2002 11:40 AM To: Chris Withers Cc: Meilicke, Scott; zope@zope.org Subject: RE: [Zope] Passing Arguments to ZSQL Method from Python Script Well, if the variables are in REQUEST, zope will bind them to the parameters of the ZSQL Method--as long as the names match. So, I could in effect call <dtml-call sql_insert> without passing any arguments. But I want to mimick this in Python Script. Another "convincing" argument can be found in the Zope Book: "If you call a Z SQL Method without argument from DTML, the arguments are automatically collected from the environment." http://www.zope.org/Documentation/Books/ZopeBook/current/RelationalDatab ases.stx#3-66 I am sure there is a way to do this in script, but I don't know how to. I am hoping that someone on this list knows. Are you convinced now? Oh, I think I have html turned off now. Chris -----Original Message----- From: Chris Withers [mailto:chrisw@nipltd.com] Sent: Wednesday, September 25, 2002 6:11 AM To: Chris A. Bruce Cc: Meilicke, Scott; zope@zope.org Subject: Re: [Zope] Passing Arguments to ZSQL Method from Python Script Chris A. Bruce wrote:
Yes, that would work. But I am trying to do it without all of that. Dtml does this automatically,
Convince us that it does ;-) And stop posting in HTML... cheers, Chris The information contained in this email message may be privileged and is confidential information intended only for the use of the recipient or any employee or agent responsible for delivering it to the intended recipient. Any unauthorized use, distribution or copying of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify the sender immediately and destroy the original message and all attachments from your electronic files.
participants (1)
-
Meilicke, Scott