Hi,

I have a very simple question about sessions.
Consider this example (found on webpy website
http://webpy.org/cookbook/sessions):

================================

import web
web.config.debug = False

urls = (
    "/count", "count",
    "/reset", "reset"
)
app = web.application(urls, locals())

web.config.session_parameters.ignore_expiry = False
web.config.session_parameters.timeout = 10
session = web.session.Session(app, web.session.DiskStore('sessions'),
{'count': 0})

class count:
    def GET(self):
        session.count += 1
        return str(session.count)

class reset:
    def GET(self):
        session.kill()
        return ""

if __name__ == "__main__":
    app.run()

================================

After 10 seconds of inactivity, the session cookie expires.
At this point, reset.GET will never be called, because an exception will be
raised by the session._processor function (in particular by session._load).

Generally, how could I call session.kill() to be able to create a new
session for the user? It can't be done with a handler, because no handler
will ever work if the session is expired!

Thank you in advance.
Lorenzo.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to