[mod_python] mod_python sessions, locking, and PSP

Jim Gallacher jpg at jgassociates.ca
Sun Aug 13 16:57:00 EDT 2006

Michael Spang wrote:
> Jim Gallacher wrote:
>> So there are 2 approaches:
>> 1. In your handler use req.session = Session.Session(req).
>>    Don't pass the session object in vars arg of PSP.run().
>>    Use the 'session' variable name in your psp template and depend on
>> it's magic.
> Ah, I didn't realize that PSP would adopt any session in req.session. I
> had thought it would always create a new session object if 'session' was
> referenced in the template.  The idea of passing the session object in
> manually and being barred from using the variable name 'session' was
> unappealing to me. Since that's not the case, I have no remaining
> objections. Thanks for sharing the magic.

I think I forgot to mention that this a new feature of 3.2, so hopefully
 you are using a version > 3.1.4.


More information about the Mod_python mailing list