[mod_python] Input on mod_python

Jorey Bump list at joreybump.com
Tue Oct 3 09:40:23 EDT 2006

edgar mortiz wrote:
> hi guys,
>   wanted to ask anyone is it possible to build a forms using 100% of
> mod_python, and not the usual part html part python script to do the
> job? any suggestions? like python cgi maybe? does it work through
> mod_python as well?

Any web application language will allow you to generate the form HTML 
and process the submitted form in the same script by using it as the 
form's action. A common approach is to act on submitted form variables 
or present an empty form if they are not there.

In pseudo code:

if req.form.has_key('foo'):

mod_python does not include any tools to build forms, which are merely 
strings of HTML. You can generate your own HTML, or find a python 
library that offers this functionality.

More information about the Mod_python mailing list