[mod_python] session redux

David Bear David.Bear at asu.edu
Wed May 24 16:26:47 EDT 2006

I'm trying to understand sessioning better. Here is a scenario:

I have a publisher script called py.py. publisher is set as the
handler for directory.

Using py.py as a dispatcher for url named modules we have

functions in py.py 		psp pages served by function
index 				main.psp
register 			register.psp
regpage2 			regp2.psp
final				final.psp

A session object is instantiated in py.py. I assume I can pass the
session object via the vars name to the psp template correct?

using http://myserver/py.py the index function serves main.psp.

using http://myserver/py.py/register the register.psp code is
'rendered'/'evaluated' and sent to the client.

Now, the question: As the user proceeds from main.psp to register.psp
to regp2.psp and so on, how to modpython know not to create a new
session object for each visit? Put another way, how would the
regp2.psp page 'know' of the session object created when the user
first visited the main.psp page?

David Bear
phone: 	480-965-8257
fax: 	480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
 "Beware the IP portfolio, everyone will be suspect of trespassing"

More information about the Mod_python mailing list