Am 27.08.2007, 15:59 Uhr, schrieb onsombal <[EMAIL PROTECTED]>:

changed_field1 = form.get('field1')
changed_field1 = "a new computed value"
field1 = changed_field1
#create a new record with form field results for field2 & field3, and a
computed value for field1

This is really bad as it undoes all your good work of checking the the values in your script. All ZSQL methods also have access to the REQUEST object by default so your ZSQL method sees context.REQUEST.field1. Way back when ZSQL was developed support for request objects was given to ZSQL to allow funky parameters in the URL as well as the other usual special methods such as manage and edit. Personally I think this is a bad idea and always pass my parameters in as named arguments as Maciej suggests or as a dictionary for neatness if there is a lot of them.


Charlie Clark

Professional Python Services directly from the Source
Python/Zope Consulting and Support ...
mxODBC.Zope.Database.Adapter ...   
mxODBC, mxDateTime, mxTextTools ...

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
Zope-DB mailing list

Reply via email to