Debugging a program that uses the session to authenticate the user is probably the same as the WEBPY session Certified sample program.
#!/usr/bin/env python#coding=utf-8import Webimport timeurls = ('/', ' Index ', '/xml ', ' pushxml ', '/login ', ' Login ', '/logout ', ' logout ',) render = Web.template.render (' templates/') web.config.debug = Falseapp = web.application (URLs, L Ocals ()) session = Web.session.Session (app, Web.session.DiskStore (' Sessions ')) class index (): Def GET (self): Try:if session.logged_in = = True:return ' At the beginning, in order to facilitate web.config.debug = True (this is the default) the session is always unable to save after quite a long time the tangled find error actually out here
Web.config.debug = FalseIf you turn off the debug mode session can normally save the reason why I lost my virginity I didn't see http://webpy.org/cookbook/sessions today.
Sessions doesn ' t work on debug mode because it interfere with reloading. See Session_with_reloader for more details.
Fuck web.py!!!
web.py Session user authentication