mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #6580 -- Added default
parameter to MultiValueDict.getlist
method (the base class for QueryDict
). Many thanks to mk and andrewebdev.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16260 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
80d6089029
commit
fc8116cc4f
3 changed files with 17 additions and 5 deletions
|
@ -448,11 +448,15 @@ In addition, ``QueryDict`` has the following methods:
|
|||
standard library. The copy will be mutable -- that is, you can change its
|
||||
values.
|
||||
|
||||
.. method:: QueryDict.getlist(key)
|
||||
.. method:: QueryDict.getlist(key, default)
|
||||
|
||||
Returns the data with the requested key, as a Python list. Returns an
|
||||
empty list if the key doesn't exist. It's guaranteed to return a list of
|
||||
some sort.
|
||||
empty list if the key doesn't exist and no default value was provided.
|
||||
It's guaranteed to return a list of some sort unless the default value
|
||||
was no list.
|
||||
|
||||
.. versionchanged:: 1.4
|
||||
The ``default`` parameter was added.
|
||||
|
||||
.. method:: QueryDict.setlist(key, list_)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue