QueryDict.__init__(query_string=None, mutable=False, encoding=None)
[source]
Instantiates a QueryDict
object based on query_string
.
>>> QueryDict('a=1&a=2&c=3') <QueryDict: {'a': ['1', '2'], 'c': ['3']}>
If query_string
is not passed in, the resulting QueryDict
will be empty (it will have no keys or values).
Most QueryDict
s you encounter, and in particular those at request.POST
and request.GET
, will be immutable. If you are instantiating one yourself, you can make it mutable by passing mutable=True
to its __init__()
.
Strings for setting both keys and values will be converted from encoding
to unicode. If encoding is not set, it defaults to DEFAULT_CHARSET
.
Please login to continue.