Skip to content

Commit

Permalink
session error
Browse files Browse the repository at this point in the history
  • Loading branch information
Davy authored and anandology committed Jan 5, 2011
1 parent f62f037 commit f126c6f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tutorial3.md
Expand Up @@ -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.',
Expand Down

0 comments on commit f126c6f

Please sign in to comment.