mirror of
https://github.com/django/django.git
synced 2025-08-19 02:01:29 +00:00
Fixed #8847, #10370: added some missing methods to MultiValueDict after [8399]. Thanks, James Turk and rfk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9ae873fcd8
commit
184ea1c91f
3 changed files with 41 additions and 9 deletions
|
@ -45,6 +45,8 @@ MergeDict can merge MultiValueDicts
|
|||
['Adrian', 'Simon']
|
||||
>>> list(d.iteritems())
|
||||
[('position', 'Developer'), ('name', 'Simon')]
|
||||
>>> list(d.iterlists())
|
||||
[('position', ['Developer']), ('name', ['Adrian', 'Simon'])]
|
||||
>>> d['lastname']
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
|
@ -58,6 +60,10 @@ MultiValueDictKeyError: "Key 'lastname' not found in <MultiValueDict: {'position
|
|||
>>> d.setlist('lastname', ['Holovaty', 'Willison'])
|
||||
>>> d.getlist('lastname')
|
||||
['Holovaty', 'Willison']
|
||||
>>> d.values()
|
||||
['Developer', 'Simon', 'Willison']
|
||||
>>> list(d.itervalues())
|
||||
['Developer', 'Simon', 'Willison']
|
||||
|
||||
### SortedDict #################################################################
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue