http.HttpResponseNotFound

class HttpResponseNotFound [source] Acts just like HttpResponse but uses a 404 status code.

http.HttpResponseNotModified

class HttpResponseNotModified [source] The constructor doesn’t take any arguments and no content should be added to this response. Use this to designate that a page hasn’t been modified since the user’s last request (status code 304).

http.HttpResponsePermanentRedirect

class HttpResponsePermanentRedirect [source] Like HttpResponseRedirect, but it returns a permanent redirect (HTTP status code 301) instead of a “found” redirect (status code 302).

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

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

http.HttpResponseServerError

class HttpResponseServerError [source] Acts just like HttpResponse but uses a 500 status code. Note If a custom subclass of HttpResponse implements a render method, Django will treat it as emulating a SimpleTemplateResponse, and the render method must itself return a valid response object.

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

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.QueryDict.appendlist()

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

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.