Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Extension to doc for 0.3/sessions #41

merged 1 commit into from

2 participants



I added a paragraph describing the interference between sessions and the reloader, and mentioned the standard web.config storage hack. Think this will save many a padawan much time.

@aaronsw aaronsw merged commit 5ab2b05 into webpy:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.