Changeset 1886
- Timestamp:
- 02/04/08 21:18:15
- Files:
-
- trunk/cherrypy/lib/sessions.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/lib/sessions.py
r1868 r1886 399 399 def __init__(self, id=None, **kwargs): 400 400 Session.__init__(self, id, **kwargs) 401 self.cursor = self.db.cursor() 402 403 def setup(cls, **kwargs): 404 """Set up the storage system for Postgres-based sessions. 405 406 This should only be called once per process; this will be done 407 automatically when using sessions.init (as the built-in Tool does). 408 """ 409 for k, v in kwargs.iteritems(): 410 setattr(cls, k, v) 411 401 412 self.db = self.get_db() 402 self.cursor = self.db.cursor()413 setup = classmethod(setup) 403 414 404 415 def __del__(self):

