> This does the trick: > > order = [] > new_order={} > prev_order=req.SESSION.get('order') > > if prev_order != None: > for orders in prev_order: > for item in orders.keys(): > new_order[item]=orders[item] > order.append(new_order) > new_order ={} 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) -- Maciej Wisniowski _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )