Yes, that would work. But I am trying to do it without all of that. Dtml does this automatically, so I am not sure if I need to somehow add user to the REQUEST or what. I am pretty sure there is a way to do it.
Thanks,
Chris Bruce
-----Original Message-----
From: Meilicke, Scott
[mailto:scott.meilicke@intp.com]
Sent: Tuesday, September 24, 2002
3:59 PM
To: Chris A. Bruce; zope@zope.org
Subject: RE: [Zope] Passing
Arguments to ZSQL Method from Python Script
Would something like this work:
for user in
context.Users.RegistrationInfo.objectValues("UserInfo"):
context.sql_users_insert(first_name=user.first_name,
last_name=user.last_name, etc.)
if user is a dictionary, the zsql arguments would be first_name=user[first_name], last_name=user[last_name], etc.
-Scott
-----Original Message-----
From: Chris A. Bruce [mailto:cbruce@sleeter.com]
Sent: Tuesday, September 24, 2002
3:36 PM
To: zope@zope.org
Subject: [Zope] Passing Arguments
to ZSQL Method from Python Script
Is there an easy way to bind the attributes of an object into the parameters of a zsql method? I am trying to do something like this in Python Script:
for user in
context.Users.RegistrationInfo.objectValues("UserInfo"):
context.sql_users_insert(user)
The sql_users_insert takes a bunch of parameters and the "user" object above is a ZClass with properties that have exact names as parameters for zsql method.
Thanks for any help,
Chris Bruce
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.