19 Mar
2007
19 Mar
'07
7:57 p.m.
Maciej Wisniowski wrote:
This seems to be hardcore ;) I mean that it should not be necessary to do such rewrite of all keys and values for dictionaries or lists taken from session. I never had to do something like that...
Isn't it working without these assignments? Just:
order=req.SESSION.get('order', []) # if there is no 'order' in session # you'll simply get empty list here new_order = {} for val in req.form.keys(): new_order[val]=req.form[val] order.append(new_order) req.SESSION['order'] = order
BTW. req.SESSION.set(..., ...) method is also persistence aware (according to zope book)
I discovered this too, after posting. You are absolutely correct! Thanks again, Norbert