Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Merge pull request #41 from samkaufman/master

Extension to doc for 0.3/sessions
  • Loading branch information...
commit 5ab2b051c48dcd42e5c2d34b9a8d3d1bbade1daf 2 parents 480c25f + cefdc88
@aaronsw aaronsw authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 docs/0.3/
13 docs/0.3/
@@ -60,4 +60,15 @@ The following code shows how to use a basic DiskStore session.
if __name__ == '__main__':
+## Sessions and Reloading/Debug Mode
+Is your session data disappearing for seemingly no reason? This can happen when using the app reloader (local debug mode), which will not persist the session object between reloads. Here's a nifty hack to get around this.
+ # Hack to make session play nice with the reloader (in debug mode)
+ if web.config.get('_session') is None:
+ session = web.session.Session(app, db.SessionDBStore())
+ web.config._session = session
+ else:
+ session = web.config._session

0 comments on commit 5ab2b05

Please sign in to comment.
Something went wrong with that request. Please try again.