how to create a new HTTPRequest record
I have a form that has var names something like this... properties.a:record properties.b:record and submit's to a python script named 'myaction'. Course this creates a record object for me in the python script that my form submits against. But, is there anyway for one python script to programatically create a record with the same attributes and invoke myaction with that record object? (this is all TTW of course) - Rocky
See the thread close by called "assignment to form records". Dieter Maurer suggests using Object for a related problem, and I did it like this: import Products.PythonScripts.standard ObjFields = Products.PythonScripts.standard.Object() ObjFields.a_field = a_value HTH, Fernando
Rocky Burt wrote at 2003-3-8 16:07 -0500:
I have a form that has var names something like this... properties.a:record properties.b:record and submit's to a python script named 'myaction'.
Course this creates a record object for me in the python script that my form submits against.
But, is there anyway for one python script to programatically create a record with the same attributes and invoke myaction with that record object?
(this is all TTW of course)
from Products.PythonScripts.standard import Object newObj= Object() for k,v in oldObj.items(): setattr(newObj,k,v) Dieter
participants (3)
-
Dieter Maurer -
Fernando Martins -
Rocky Burt