Re: QueryDict and its .dict() method - why does it do that?

2015-03-28 Thread Stephen J. Butler
For those interested, here's some code that does this in Django as request.PARAMS: https://github.com/sbutler/django-nestedparams It is extremely alpha. I wouldn't use it in your code. I did it as a proof of concept, but if other want to hack on it I'd be happy to accept pull requests. On Thu, M

Re: QueryDict and its .dict() method - why does it do that?

2015-03-28 Thread Gabriel Pugliese
Probably we could get most used frameworks or parser libs from most languages to just get statistics of what is being done? I'm not saying that we need to change anything if we see some "standard", it's just for science. On Sat, Mar 28, 2015, 8:38 AM Masklinn wrote: > On 2015-03-28, at 11:37 , S

Re: QueryDict and its .dict() method - why does it do that?

2015-03-28 Thread Masklinn
On 2015-03-28, at 11:37 , Stephen J. Butler wrote: > > Let's be accurate here: what PHP, Rails, jQuery, et al. do is not > "non-standard". There's nothing wrong with their key-value pairs in > the query string. Well there is the problem that it's really not specified (so hardly a standard), the

Re: QueryDict and its .dict() method - why does it do that?

2015-03-28 Thread James Bennett
On Sat, Mar 28, 2015 at 5:37 AM, Stephen J. Butler wrote: > Let's be accurate here: what PHP, Rails, jQuery, et al. do is not > "non-standard". There's nothing wrong with their key-value pairs in > the query string. This is further illustrated by the fact that no > browser I am aware of has probl

Re: QueryDict and its .dict() method - why does it do that?

2015-03-28 Thread Stephen J. Butler
On Fri, Mar 27, 2015 at 2:50 PM, Carl Meyer wrote: > Hi Gabriel, > > On 03/27/2015 01:34 PM, Gabriel Pugliese wrote: >> @Masklinn >> That input is from jQuery's default serializer. It sends the data with >> contentType 'application/x-www-form-urlencoded; charset=UTF-8'. I just >> need to pass a da

RE: QueryDict and its .dict() method - why does it do that?

2015-03-28 Thread bab mis
Sent from my Windows Phone From: Simon Charette<mailto:charett...@gmail.com> Sent: ‎3/‎28/‎2015 2:01 To: django-users@googlegroups.com<mailto:django-users@googlegroups.com> Subject: Re: QueryDict and its .dict() method - why does it do that? Hi G

Re: QueryDict and its .dict() method - why does it do that?

2015-03-27 Thread Gabriel Pugliese
Thanks for kind answers guys. Best Regards On Fri, Mar 27, 2015, 5:31 PM Simon Charette wrote: > Hi Gabriel, > > One thing I dislike about how PHP/Rail deal with this is the fact they > expose an easy way to shoot yourself in the foot. > > e.g. PHP > > Your code expects $_GET['foo'] to be an ar

Re: QueryDict and its .dict() method - why does it do that?

2015-03-27 Thread Simon Charette
Hi Gabriel, One thing I dislike about how PHP/Rail deal with this is the fact they expose an easy way to shoot yourself in the foot. e.g. PHP Your code expects $_GET['foo'] to be an array() but the querystring is missing the trailing "[]" (?foo=bar) and crash. This also open a door for subtle

Re: QueryDict and its .dict() method - why does it do that?

2015-03-27 Thread Carl Meyer
Hi Gabriel, On 03/27/2015 02:10 PM, Gabriel Pugliese wrote: > I perfectly understand what you are saying. It was very clear and > informative, but do not agree with the design chosen here. Below is just > an opinion and you do not have to agree with it: That's good :-) I probably won't continue w

Re: QueryDict and its .dict() method - why does it do that?

2015-03-27 Thread Gabriel Pugliese
Hi Carl, I perfectly understand what you are saying. It was very clear and informative, but do not agree with the design chosen here. Below is just an opinion and you do not have to agree with it: My buddies have given PHP and Rails examples, but there are other frameworks from other languages

Re: QueryDict and its .dict() method - why does it do that?

2015-03-27 Thread Carl Meyer
Hi Gabriel, On 03/27/2015 01:34 PM, Gabriel Pugliese wrote: > @Masklinn > That input is from jQuery's default serializer. It sends the data with > contentType 'application/x-www-form-urlencoded; charset=UTF-8'. I just > need to pass a data parameter with my JS Object (JSON) and it does the > magic

Re: QueryDict and its .dict() method - why does it do that?

2015-03-27 Thread Gabriel Pugliese
@Daniel, oh really that Rails is not Django? Haven't noticed on my years of Python web development. Thanks! @Masklinn That input is from jQuery's default serializer. It sends the data with contentType 'application/x-www-form-urlencoded; charset=UTF-8'. I just need to pass a data parameter with

Re: QueryDict and its .dict() method - why does it do that?

2015-03-26 Thread Masklinn
On 2015-03-26, at 18:48 , Gabriel Pugliese wrote: > This gist is self informative - some information from list is lost: > https://gist.github.com/gabrielhpugliese/640b69eefc5b7490a07c > > Some of my buddies have pasted Rails(Rack) and PHP conversion right below. Is > that something I am missing

Re: QueryDict and its .dict() method - why does it do that?

2015-03-26 Thread Daniel Roseman
On Thursday, 26 March 2015 17:52:48 UTC, Gabriel Pugliese wrote: > > This gist is self informative - some information from list is lost: > https://gist.github.com/gabrielhpugliese/640b69eefc5b7490a07c > > Some of my buddies have pasted Rails(Rack) and PHP conversion right below. > Is that somethi

QueryDict and its .dict() method - why does it do that?

2015-03-26 Thread Gabriel Pugliese
This gist is self informative - some information from list is lost: https://gist.github.com/gabrielhpugliese/640b69eefc5b7490a07c Some of my buddies have pasted Rails(Rack) and PHP conversion right below. Is that something I am missing? Does it have to do with laziness? -- You received this me