http.QueryDict.__getitem__()

QueryDict.__getitem__(key) Returns the value for the given key. If the key has more than one value, __getitem__() returns the last value. Raises django.utils.datastructures.MultiValueDictKeyError if the key does not exist. (This is a subclass of Python’s standard KeyError, so you can stick to catching KeyError.)

http.QueryDict.setdefault()

QueryDict.setdefault(key, default=None) [source] Just like the standard dictionary setdefault() method, except it uses __setitem__() internally.

http.QueryDict.setlist()

QueryDict.setlist(key, list_) [source] Sets the given key to list_ (unlike __setitem__()).

http.QueryDict.setlistdefault()

QueryDict.setlistdefault(key, default_list=None) [source] Just like setdefault, except it takes a list of values instead of a single value.

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'])

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.iterlists()

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

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.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.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')]