[mod_python] Publisher handler and authentication handler questions

Kory Hamzeh kory at avatar.com
Wed Jul 27 17:37:29 EDT 2011

Hello Everyone,

I am rather new to mod_python (and python in general). I have a basic
handler running using the publisher handler and I'm doing authentication
using the PythonAuthenHandler handler (not the __auth__ method). I have the
following questions:

1. The authentication is working exactly as described. There are cases where
I want to basically un-authenticate the user without having the user have to
exit and restart the browser. Essentially doing a "logout". Is there any way
to do this? I'm using the authentication as a lazy man's way of doing user
login management without having to worry about SSL, etc. 

2. I'm trying to understand how form data/values are passed to the handler
when the client does a POST. The docs seem to say conflicting thing. This


says the form data is passed as arguments to the handler. This seems to work
and every example code I've seen uses this method. But this page:


states that form data/values are passed in as an instance for the
FieldStorage class in a variable called 'form' in the request object. I have
never seen an instance of this object or any variable named 'form' in the
request structure. What am I misunderstanding?

3. Regarding question #2, if I wanted to created an instance for the
FieldStorage class to get the form data, what is the correct syntax for the
code? I keep getting syntax errors. As I mentioned earlier, I don't have too
much experience with python, specially using classes.

Any help would be greatly appreciated!


More information about the Mod_python mailing list