[mod_python] Approaches to handling input forms.

David Fraser davidf at sjsoft.com
Wed Oct 20 03:14:42 EDT 2004

Graham Dumpleton wrote:

>A question on what people perceive as being best practice as far as dealing
>with forms when using mod_python.
>Imagine there is a form for logging into a site and its url is at "login". I've
>ignored extensions in this discussion as different mechanisms may or may
>not make it easy to use them.
>Is there a tendency to have the form when submitted, post back using
>the same url, ie., ACTION field in form is not set, or to a different url.
I have a fairly large application and so what we do is have one central 
handler which dispatches the requests to other handlers.
Form handling is done in the central handler based on an action variable 
that is set.
What this enables is somebody to submit a form, have the central handler 
change variables in a database in response to that, and then have the 
form appear again with the modified information visible.
I think it depends on your requirements, but I've certainly found it 
useful to be able to post back to the same URL


More information about the Mod_python mailing list