http.QueryDict.dict()

QueryDict.dict() Returns dict representation of QueryDict. For every (key, list) pair in QueryDict, dict will have (key, item), where item is one element of the list, using same logic as QueryDict.__getitem__(): >>> q = QueryDict('a=1&a=3&a=5') >>> q.dict() {'a': '5'}

http.QueryDict.get()

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.

http.QueryDict.getlist()

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. It’s guaranteed to return a list of some sort unless the default value provided is not a list.

http.QueryDict.items()

QueryDict.items() Just like the standard dictionary items() method, except this uses the same last-value logic as __getitem__(). For example: >>> q = QueryDict('a=1&a=2&a=3') >>> q.items() [('a', '3')]

http.QueryDict.iteritems()

QueryDict.iteritems() Just like the standard dictionary iteritems() method. Like QueryDict.items() this uses the same last-value logic as QueryDict.__getitem__().

http.QueryDict.iterlists()

QueryDict.iterlists() Like QueryDict.iteritems() except it includes all values, as a list, for each member of the dictionary.

http.QueryDict.itervalues()

QueryDict.itervalues() Just like QueryDict.values(), except an iterator. In addition, QueryDict has the following methods:

http.QueryDict.lists()

QueryDict.lists() Like items(), except it includes all values, as a list, for each member of the dictionary. For example: >>> q = QueryDict('a=1&a=2&a=3') >>> q.lists() [('a', ['1', '2', '3'])]

http.QueryDict.pop()

QueryDict.pop(key) [source] Returns a list of values for the given key and removes them from the dictionary. Raises KeyError if the key does not exist. For example: >>> q = QueryDict('a=1&a=2&a=3', mutable=True) >>> q.pop('a') ['1', '2', '3']

http.QueryDict.popitem()

QueryDict.popitem() [source] Removes an arbitrary member of the dictionary (since there’s no concept of ordering), and returns a two value tuple containing the key and a list of all values for the key. Raises KeyError when called on an empty dictionary. For example: >>> q = QueryDict('a=1&a=2&a=3', mutable=True) >>> q.popitem() ('a', ['1', '2', '3'])