[mod_python] Sessions

Graham Dumpleton grahamd at dscpl.com.au
Thu Jun 2 20:27:37 EDT 2005


Nathan Olberding wrote ..
> In whatever function:
> 
> session = Session.Session(req)
> session["foo"] = "This is the foo string"
> session.save()
> 
> Then, in the function that generates the next page:
> 
> session = Session.Session(req)
> session.load()
> # Now, session["foo"] should equal "This is the foo string"

FYI.

Presuming you mean these two bits of code are in handlers for
different request URLs, I believe the "load()" is actually redundant
as it is done in the constructor of the Session object.

Graham


More information about the Mod_python mailing list