[Zope] Give ":Record" modifier in forms access to python scritps [newbie]

Evan Simpson evan@4-am.com
Thu, 24 May 2001 15:27:31 -0400


From: "Philippe Jadin" <philippe.jadin@123piano.com>
> So, in the python script, how can I tell : "run over each record in the
> metadata record, and create a property with the name and value of each
> record" ? Is it the right way to do this?

Almost.  Never trust the browser.  You should set up the property schema
yourself, then plug in the values from the record, like this:

doc.manage_addProperty('prop1', '', 'string')
doc.manage_addProperty('prop2', '0', 'integer')
doc.manage_changeProperties(metadata)

Cheers,

Evan @ digicool & 4-am