[mod_python] Sessions

Graham Dumpleton grahamd at dscpl.com.au
Thu Jun 2 18:44:37 EDT 2005


On 03/06/2005, at 8:13 AM, Timothy Kendall wrote:

> Sorry for posting such a beginner's question, but...
>
> I've been using Python for some time, but I'm new to mod_python.  I 
> need to learn how to implement sessions.  I've been through section 
> 4.8 of the mod_python manual, but what's there doesn't tell me how to 
> proceed (not so that my admittedly deficient mind can grasp it, 
> anyway).  Is there a step-by-step xplanation anyone can point me to?  
> Seems like there must be, but I can't seem to find one.

Sessions merely as a way of storing a bit of information while a user is
browsing your site, or in conjunction with a forms based login 
mechanism?
The latter can add a bit more complexity to it.

Also, what packages might you be using in conjunction with mod_python? 
Ie.,
are you writing your own handler from scratch, or are you going to be 
using
mod_python.publisher, mod_python.psp or some third party system? This is
relevant in that some packages partly handle session stuff for you.

Sorry I haven't answered your question, but no time right now. If you 
can
answer the questions above though, will help me later and others to 
perhaps
give a more useful answer to you.

In the mean time, if you want to look at some code for a working example
of a session based login, check out:

   http://svn.dscpl.com.au/vampire/trunk/examples/session/
   http://svn.dscpl.com.au/vampire/trunk/examples/session/login.py

   http://www.dscpl.com.au/projects/vampire/examples/session

This may or may not help you understand the documentation a bit better.

Later.

Graham




More information about the Mod_python mailing list