Permalink
Browse files

session error

  • Loading branch information...
1 parent f62f037 commit f126c6f7d44e74f38d7d297a4c6a237b7f93194f Davy committed with anandology Nov 19, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 tutorial3.md
View
@@ -667,8 +667,13 @@ hello.py
app = web.application(urls, globals())
render = web.template.render('templates/')
- session = web.session.Session(app, web.session.DiskStore('sessions'),
+
+ if web.config.get('_session') is None:
+ session = web.session.Session(app, web.session.DiskStore('sessions'),
initializer={'user': 'anonymous'})
+ web.config._session = session
+ else:
+ session = web.config._session
signin_form = form.Form(form.Textbox('username',
form.Validator('Unknown username.',

0 comments on commit f126c6f

Please sign in to comment.