summaryrefslogtreecommitdiff
path: root/django/http
diff options
context:
space:
mode:
authorDuncan Parkes <duncan@mysociety.org>2014-06-11 21:41:25 +0100
committerTim Graham <timograham@gmail.com>2014-06-24 21:42:18 -0400
commite8e16abe6a797789427a79cd66175ae70f392a08 (patch)
treeafecf5b08a0cc4322abf34de2235a2478c017c3e /django/http
parentea64ef7ed702ebaf68877c73ba0d8bb832d16415 (diff)
[1.7.x] Improved documentation for QueryDict.
Backport of 7f4e2ef1e9 from master
Diffstat (limited to 'django/http')
-rw-r--r--django/http/request.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/django/http/request.py b/django/http/request.py
index ecad639c82..1306dd3227 100644
--- a/django/http/request.py
+++ b/django/http/request.py
@@ -288,12 +288,19 @@ class HttpRequest(object):
class QueryDict(MultiValueDict):
"""
- A specialized MultiValueDict that takes a query string when initialized.
- This is immutable unless you create a copy of it.
+ A specialized MultiValueDict which represents a query string.
- Values retrieved from this class are converted from the given encoding
+ A QueryDict can be used to represent GET or POST data. It subclasses
+ MultiValueDict since keys in such data can be repeated, for instance
+ in the data from a form with a <select multiple> field.
+
+ By default QueryDicts are immutable, though the copy() method
+ will always return a mutable copy.
+
+ Both keys and values set on this class are converted from the given encoding
(DEFAULT_CHARSET by default) to unicode.
"""
+
# These are both reset in __init__, but is specified here at the class
# level so that unpickling will have valid values
_mutable = True