[mod_python] Publisher, how to handle sessions

Mihamina Rakotomandimby mihamina at lab.vectoris.fr
Mon Mar 2 15:20:30 EST 2009

My .htaccess: 
My Python file:

Two templates:

Please, these files are crappy, just for testing purpose, disable your 
--pedant flag ;-).

I see the session mecanism working with those files:
If a session['login'] is set, then it's OK.

When using PSP handler (not the Publisher) just using a variable named 
"session" is enough to handle sessions. Here, I had to instanciate one 
in each function.
On the other hand, I saw forms are very easily handled, they are 
automagically set to variables.

Is there a way, using the Publisher, to easily handle sessions?

My real goal is to use templating-like code, just like this one given in 
example, _and_ easily handle forms and session. I do want to use 
mod_python (just mod_python, nothig more): the publisher might not be 
the best approach?

Thank you!

Chef de projet chez Vectoris
Telephone: +261 33 11 207 36

More information about the Mod_python mailing list