[mod_python] POST variables with SetHandler ?

Luis Bruno lbruno at republico.estv.ipv.pt
Thu Apr 14 14:50:34 EDT 2005


Adrian Immler wrote:
>   <Directory /....../htdocs/music>
>     SetHandler mod_python
>     PythonHandler mod_python.publisher
>   </Directory>
> 
> somehow in /music i cant access the POST variables

I'll try to make it short; with mod_python.publisher, you can do this:

http://example.com/user.py/save?name=LuisBruno&password=aybabtu

| def save(req, username, password):
|     pass

I think GET and POST work the same way; if more arguments are specified
by the HTTP client than you expect, those are discarded (unless you use
**kwargs). I *think* if some non-keyword arguments aren't specified,
they are set to None.

I gleaned this from:
http://www.modpython.org/live/current/doc-html/hand-pub-alg-args.html

Cheers,
-- 
Luis "Flames gladly accepted if my memory is wrong" Bruno


More information about the Mod_python mailing list