This will probably breaking compatibility with previous version of Django,
breaking a lot of website in subtle way.

Printing a debug message in the log when calling QueryDict.get on key being
present more than once sound more reasonable. That should be doable as an
third party app but that wouldn't help beginners.

On 19 Jul 2018 8:19 am, "Philip Lee" <[email protected]> wrote:

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 expected than returning all the values of the key(that is
the behavior of `QueryDict.getlist(_key_, _default=None_)` right now)?  If
not, I'd suggest to change the behavior of `QueryDict.get(_key_,
_default=None_)` to return all the values of the same key for a natural
usage so that avoid confusing problems caused by the current behavior like
https://stackoverflow.com/questions/50044626/querydict-returning-strange-value-in-django
https://code.djangoproject.com/ticket/1130

-- 
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/5a6263e2-5872-400c-af1b-aa2c74244247%40googlegroups.com
<https://groups.google.com/d/msgid/django-developers/5a6263e2-5872-400c-af1b-aa2c74244247%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAEuG%2BTagMKZ-XQu31RodotpK0-uKpC8tmMNuH4Q8m0SudDfQng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to