I am trying to store dynamically generated DB into session but it fails with
error  . is that supported or if i want to share DB Globally , across
controller , only within a session,  but it is dynamically generated how
should i share without puttint into models??


case_db=DAL('mysql://r...@localhost/'+ request.vars.db_name)
case_db.define_table(...)
session.case_db=case_db






Traceback (most recent call last):
  File "/home/v3ss/workspace-bbb/web2py-clone/gluon/main.py", line
411, in wsgibase

    session._try_store_on_disk(request, response)

  File "/home/v3ss/workspace-bbb/web2py-clone/gluon/globals.py", line
377, in _try_store_on_disk

    cPickle.dump(dict(self), response.session_file)

  File "/usr/lib/python2.6/copy_reg.py", line 74, in _reduce_ex

    getstate = self.__getstate__
  File "/home/v3ss/workspace-bbb/web2py-clone/gluon/sql.py", line
1380, in __getattr__

    return dict.__getitem__(self,key)
KeyError: '__getstate__'

Reply via email to