diff options
author | David Sanders <dsanders@rapilabs.com> | 2015-09-05 19:09:18 +1000 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-09-05 08:22:35 -0400 |
commit | 9cc6a606c6a0603214087fad156a071570ac64e0 (patch) | |
tree | 0aee3f86cac54c3d21eaa13cb9b3153c1d5abd1d | |
parent | 2d2eeff3b1cbdaa3b8f22a904da044ac709cc07e (diff) | |
download | django-9cc6a606c6a0603214087fad156a071570ac64e0.tar.gz |
[1.7.x] Added default value for default kwargs for QueryDict.
Backport of 48c420d99209b147b58d7b873d1b54f76249c8dc from master
-rw-r--r-- | docs/ref/request-response.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt index 0384448ab0..02cecad7d2 100644 --- a/docs/ref/request-response.txt +++ b/docs/ref/request-response.txt @@ -398,12 +398,12 @@ a subclass of dictionary. Exceptions are outlined here: Returns ``True`` if the given key is set. This lets you do, e.g., ``if "foo" in request.GET``. -.. method:: QueryDict.get(key, default) +.. method:: QueryDict.get(key, default=None) Uses the same logic as ``__getitem__()`` above, with a hook for returning a default value if the key doesn't exist. -.. method:: QueryDict.setdefault(key, default) +.. method:: QueryDict.setdefault(key, default=None) Just like the standard dictionary ``setdefault()`` method, except it uses ``__setitem__()`` internally. @@ -461,7 +461,7 @@ In addition, ``QueryDict`` has the following methods: Returns a copy of the object, using ``copy.deepcopy()`` from the Python standard library. This copy will be mutable even if the original was not. -.. method:: QueryDict.getlist(key, default) +.. method:: QueryDict.getlist(key, default=None) Returns the data with the requested key, as a Python list. Returns an empty list if the key doesn't exist and no default value was provided. @@ -476,7 +476,7 @@ In addition, ``QueryDict`` has the following methods: Appends an item to the internal list associated with key. -.. method:: QueryDict.setlistdefault(key, default_list) +.. method:: QueryDict.setlistdefault(key, default_list=None) Just like ``setdefault``, except it takes a list of values instead of a single value. |