diff options
| author | Duncan Parkes <duncan@mysociety.org> | 2014-06-11 21:41:25 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-06-24 21:40:21 -0400 |
| commit | 7f4e2ef1e9e9f5c86217ccf9ac97391291a9d422 (patch) | |
| tree | 143fcc9dc6c2eb7e4d8f7fc8e96c84ee860374c7 /django | |
| parent | 48241ec9c4e971042c69fb26a8328f3055eed462 (diff) | |
Improved documentation for QueryDict.
Diffstat (limited to 'django')
| -rw-r--r-- | django/http/request.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/django/http/request.py b/django/http/request.py index 250db32bf2..097bcff310 100644 --- a/django/http/request.py +++ b/django/http/request.py @@ -299,12 +299,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 |
