[mod_python] Validating input - Form Handler component

Daniel J. Popowich dpopowich at comcast.net
Thu Oct 5 11:50:56 EDT 2006

durumdara writes:
> Do you knows about a Form handler component (module, class, unit, 
> package, etc.) that can uniformize the form handling on the web ?
> The html form handling forces me to I repeat some of the codes in many 
> modules.
> Example:
> 1. Init
> 2. Get inputs
> 3. Validating inputs: check field names, data types, I need to open 
> queries to see that actual data is valid (and existing), require all the 
> fields I need to make the next step, convert data from text to any type, 
> protect fields from SQL injection, etc.
> 3. Make operation (insert, update, delete, or select)
> 4. Show the results, build the result table and/or the form again.

Mod_python Servlets (mpservlets) has a facility to cast any form data
into any python type.  If you don't want the whole mpservlets thing,
you can always grab the code.

Mpservlets homepage:

Live tutorial:

First of seven pages in tutorial dealing with form data processing:


Daniel Popowich

More information about the Mod_python mailing list