[Zope-DB] Sending DB data via the SESSION Manager

Braun Brelin bbrelin@openapp.biz
Mon, 14 Apr 2003 13:55:59 +0100


I've built a formulator form that connects to a database to populate many of the
fields in the form.  I'm using the MySQL DB adapter and I've written a python
script to access it and return the data via the SESSION Manager like so...

for (key,value) in recordset.items():

This, however isn't precisely what I want.  If I create two separate instances
of the formulator form (i.e. I do a copy/paste from the master form object into
my own folder more than once)  The second form gets the same datavalues
automatically rendered into the field as the first form.   What I want, instead,
is in the SESSION object to set a dictionary where each key would be the form ID
and the value would be another dictionary containing the database field values. 

How do I go about doing this?  I tried doing something like this: 


but that fails with an "unhashable type" error.   
Is what I'm attempting even possible with the SESSION object? 

Any thoughts? 


Braun Brelin

This mail sent through IMP: http://horde.org/imp/