[mod_python] Re: Specifying GET/POST method for FieldStorage

Graham Dumpleton grahamd at dscpl.com.au
Mon Mar 13 03:59:08 EST 2006

I haven't really applied the concepts much myself, but one option
which I am sure others are likely suggest is to follow REST style
conventions for URLs instead. See:


Anyone want to contribute suggestions as to how REST style URLs
could be used to do this.

BTW, am not suggesting you did this, merely interested for my own
education as to how the REST supporters would do it.


On 13/03/2006, at 7:35 PM, Frédéric Jolliton wrote:
> Why ? Simply because I want to have full knowledge about the
> values. And mainly because the meaning of the values is not the same
> according to their origins !
> A contrived example:
> (I don't doubt someone will answer "Don't do that", but let say I
> want.)
> Say I've at http://example.com/books/?sort=author&title=full a form
> like this:
> <form method="POST" action="/books/?sort=author&amp;title=full">
> <fieldset><legend> Add a book </legend>
>                <input type="hidden" name="action" value="add-a-book" />
> <p> Author:    <input type="entry"  name="author" /> </p>
> <p> Title:     <input type="entry"  name="title" /> </p>
> <p> Publisher: <input type="entry"  name="publisher" /> </p>
> <p>            <input type="submit" name="submit" value="Add" /> </p>
> </fieldset>
> </form>
> Here, in this example, there is a clash because the query string
> (which is kept from the original URL to maintain the parameters)
> include 'title' and the form also include such a field with this name.
> To summarize, in this example:
>  - page parameters (query string) = ['sort', 'title']
>  - form fields (post method) = ['action', 'author', 'title', 
> 'publisher', 'submit']
> However, and it's the point on my patch, I don't attach the same
> semantic to query string values (which are there to "configure" the
> current page) and to the post values (which are the result of the form
> and which modify the contents or the resource or whatever) because to
> me it's really 2 different *namespaces*, hence the need to parse them
> into different field storages if necessary.
> Does that make sense ?
> After all, mod_python is about controlling every aspect of the
> request, no ? :)
> -- 
> Frédéric Jolliton
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list