Re: The behavior of QueryDict.get(_key_, _default=None_)

2018-07-19 Thread Philip Lee
so maybe we should add to the documentation of https://docs.djangoproject.com/en/2.0/ref/request-response/#django.http.QueryDict *If want to get multiple values for the same key, use QueryDict.getlist(key, default=None) instead of QueryDict.get(key, default=None)* add example to https://docs.d

The behavior of QueryDict.get(_key_, _default=None_)

2018-07-18 Thread Philip Lee
I was trapped by the behavior of `QueryDict.get(_key_, _default=None_)` for a bit while before consulting the documentation , for that *If the key has more than one value, it returns the last value.* So as for multiple values for the same key, is returning the last value of key more often expe

Re: [feature request] including HttpResponse(status=204) as an HttpResponse subclasses

2017-04-06 Thread Philip Lee
onse 204 site: > code.djangoproject.com) > > On Wednesday, April 5, 2017 at 11:25:44 AM UTC-4, Philip Lee wrote: >> >> Every Django view function MUST return an HttpResponse object, sometimes we >> just want to send data to the server and don't want to send da

[feature request] including HttpResponse(status=204) as an HttpResponse subclasses

2017-04-05 Thread Philip Lee
Every Django view function MUST return an HttpResponse object, sometimes we just want to send data to the server and don't want to send data back to the client , this probably lead Python users want to return None instead, however , this is not allowed in Django view function, I found HttpRe