http.QueryDict.itervalues()

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

http.QueryDict.copy()

QueryDict.copy() [source] Returns a copy of the object, using copy.deepcopy() from the Python standard library. This copy will be mutable even if the original was not.

http.QueryDict.appendlist()

QueryDict.appendlist(key, item) [source] Appends an item to the internal list associated with key.

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.HttpResponseRedirect.url

url This read-only attribute represents the URL the response will redirect to (equivalent to the Location response header).

http.HttpResponseRedirect

class HttpResponseRedirect [source] The first argument to the constructor is required – the path to redirect to. This can be a fully qualified URL (e.g. 'https://www.yahoo.com/search/'), an absolute path with no domain (e.g. '/search/'), or even a relative path (e.g. 'search/'). In that last case, the client browser will reconstruct the full URL itself according to the current path. See HttpResponse for other optional constructor arguments. Note that this returns an HTTP status code 302. ur

http.QueryDict

class QueryDict [source] In an HttpRequest object, the GET and POST attributes are instances of django.http.QueryDict, a dictionary-like class customized to deal with multiple values for the same key. This is necessary because some HTML form elements, notably <select multiple>, pass multiple values for the same key. The QueryDicts at request.POST and request.GET will be immutable when accessed in a normal request/response cycle. To get a mutable version you need to use .copy().

http.JsonResponse

class JsonResponse(data, encoder=DjangoJSONEncoder, safe=True, json_dumps_params=None, **kwargs) [source] An HttpResponse subclass that helps to create a JSON-encoded response. It inherits most behavior from its superclass with a couple differences: Its default Content-Type header is set to application/json. The first parameter, data, should be a dict instance. If the safe parameter is set to False (see below) it can be any JSON-serializable object. The encoder, which defaults to django.core