[Web-SIG] Form field dictionaries

Simon Willison cs1spw at bath.ac.uk
Tue Oct 28 18:24:37 EST 2003

Moof wrote:
> On appeasement approach would be do a webkit-like thing. Currently in 
> webkit you can choose to get stuff out of the submitted data (GET and 
> POST are scrunched together) or out of the cookies, or you can just ask 
> for request.value() (which is aliased also to request.__getattr__) which 
> will look in both places and returns the first thing it comes to.
> so how about a request.postvalues dict, a request.getvalues dict, and a 
> request.values dict (or pseudo-dict) which will return value out of 
> whichever. The main downside I can see with this is a long ensuing 
> argument about whether GET should take precedence over POST or vice-versa.

I'm quite fond of request.GET and request.POST personally, but that's my 
PHP background speaking. I'm not sure that upper case dictionary names 
are particularly pythonic. request.getvalues and request.postvalues seem 
a bit verbose to my liking.

Is there really a long ensuing argument about precedence of GET over 
POST? I had always assumed that the standard way of tackling this was 
for POST data to over-write GET data since POST was the actual HTTP 
action used in a combined request.
Simon Willison
Web development weblog: http://simon.incutio.com/

More information about the Web-SIG mailing list