Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

session error

  • Loading branch information...
commit f126c6f7d44e74f38d7d297a4c6a237b7f93194f 1 parent f62f037
Davy authored anandology committed
Showing with 6 additions and 1 deletion.
  1. +6 −1 tutorial3.md
View
7 tutorial3.md
@@ -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.',
Please sign in to comment.
Something went wrong with that request. Please try again.