my data ends up looking like this:
order [{}, {}, {'foo': '1', 'bar': 'a'}, {}, {'foo': '2', 'bar': 'b'}, {'foo': '6', 'bar': 'z'}, {'foo': '1', 'bar': 'a'}] What is wrong here? I mean what output is expected?
I've seen http://mail.zope.org/pipermail/zope-dev/2006-July/027890.html and am aware that related bug existed prior to 2.7.1. There is 'faster' that is alternative sessioning machinery but I don't know if it works with 2.7
I've used sessions without problems before, this is the first time I attempt to store variables in containers. What am I doing wrong? Maybe it is because of req.form assignment. Try to create copy of its values and append this to 'order' list like:
session = context.REQUEST.SESSION order = session.get('order', []) order.append({'foo':req.form['foo'], 'bar':req.form['bar']}) session.set('order',order) and see what happens now. -- Maciej Wisniowski