[mod_python] Custom Login with redirection back to referer

Geoff Skerrett geoff at teammsa.com
Fri May 19 14:57:37 EDT 2006

I am hoping someone can get me back on track and point me in thr right
I want to create a process where if the user requests a page they are not
authorized for then;
1) a custom logon form is displayed
2) the users submits and it is processed verifying against a database if the
user is valid
3) as part of the processing a session is created 
4) the session stores the some data  (userid, name, lastip, etc)
5) when complete the system redirects the user to the original page (ie the
referrer for the login)
I have a test case working and using the util.redirect function.  Everything
works fine, but the referred page is processed, it gets a new session so the
variables I have stored during the login page process aren't available to
the refered page.
What am I missing? What is the best strategy for storing the session
variables and dealing with this type of process ?
I am using the mp.publisher Apache/2.0.54 (Win32) mod_python/3.2.8
Python/2.4.1 Server

More information about the Mod_python mailing list