[Zope] :records and value assignment in Python Script
Milos Prudek
prudek@nembv.cz
Mon, 6 Aug 2001 08:05:32 +0200
Struggling with the ":records" form construct...
I have a "writers" object that contains fname and lname text fields. It
looks like this:
[fname: "Chris", lname: "McDonough", fname: "John", lname: "Malkovich"]
I need to add a new text field, auth, and I need to compute and assign it's
value during the form processing.
Adding new field was not that difficult: I just changed the form and added
<input type="hidden" name="auth" value="">. I don't know how I would add a
new field using Python... but it is not important right now.
But how can I change the value? I tried this inside Python Script:
for w in writers:
print w.auth # this is OK.
w.auth="x" # this fails with "attribute-less object (assign or del)".
--
Milos Prudek