[mod_python] cgi handler

Graham Dumpleton graham.dumpleton at gmail.com
Sun Apr 8 21:52:13 EDT 2007


On 09/04/07, Philippe Schottey <phillscot at mac.com> wrote:
> Hello,
>
> This is the first time i'm using python and mod_python.
> The hosting company only wants to use the cgi_handler.

Can you confirm that what you mean is that the web hosting company is
only allowing you to use as the handler for mod_python:

  PythonHandler mod_python.cgihandler

Just want to confirm so that we know for sure that you aren't just
using standard CGI.

> I have some problems retrieving POST and GET parameters.
> I've read somewhere that this should do the trick:
>
> import cgi
> form = cgi.FieldStorage()
> value = form[key]

Can you perhaps show a more complete script?

Also, which version of mod_python is being used and which version of Python?

Graham

> When I'm trying this, the form object is allways empty.
> The form code:
>  <form name="main" action="test.py" method="POST">
>  <input type="hidden" name="action" id="action" value="good"/>
>             <input type="submit"/>
>  </form>
>
> I can't seem to retrieve the action parameter.


More information about the Mod_python mailing list