Loading django/http/__init__.py +3 −9 Original line number Diff line number Diff line Loading @@ -634,14 +634,14 @@ class HttpResponseRedirect(HttpResponse): status_code = 302 def __init__(self, redirect_to): HttpResponse.__init__(self) super(HttpResponseRedirect, self).__init__() self['Location'] = iri_to_uri(redirect_to) class HttpResponsePermanentRedirect(HttpResponse): status_code = 301 def __init__(self, redirect_to): HttpResponse.__init__(self) super(HttpResponsePermanentRedirect, self).__init__() self['Location'] = iri_to_uri(redirect_to) class HttpResponseNotModified(HttpResponse): Loading @@ -660,21 +660,15 @@ class HttpResponseNotAllowed(HttpResponse): status_code = 405 def __init__(self, permitted_methods): HttpResponse.__init__(self) super(HttpResponseNotAllowed, self).__init__() self['Allow'] = ', '.join(permitted_methods) class HttpResponseGone(HttpResponse): status_code = 410 def __init__(self, *args, **kwargs): HttpResponse.__init__(self, *args, **kwargs) class HttpResponseServerError(HttpResponse): status_code = 500 def __init__(self, *args, **kwargs): HttpResponse.__init__(self, *args, **kwargs) # A backwards compatible alias for HttpRequest.get_host. def get_host(request): return request.get_host() Loading Loading
django/http/__init__.py +3 −9 Original line number Diff line number Diff line Loading @@ -634,14 +634,14 @@ class HttpResponseRedirect(HttpResponse): status_code = 302 def __init__(self, redirect_to): HttpResponse.__init__(self) super(HttpResponseRedirect, self).__init__() self['Location'] = iri_to_uri(redirect_to) class HttpResponsePermanentRedirect(HttpResponse): status_code = 301 def __init__(self, redirect_to): HttpResponse.__init__(self) super(HttpResponsePermanentRedirect, self).__init__() self['Location'] = iri_to_uri(redirect_to) class HttpResponseNotModified(HttpResponse): Loading @@ -660,21 +660,15 @@ class HttpResponseNotAllowed(HttpResponse): status_code = 405 def __init__(self, permitted_methods): HttpResponse.__init__(self) super(HttpResponseNotAllowed, self).__init__() self['Allow'] = ', '.join(permitted_methods) class HttpResponseGone(HttpResponse): status_code = 410 def __init__(self, *args, **kwargs): HttpResponse.__init__(self, *args, **kwargs) class HttpResponseServerError(HttpResponse): status_code = 500 def __init__(self, *args, **kwargs): HttpResponse.__init__(self, *args, **kwargs) # A backwards compatible alias for HttpRequest.get_host. def get_host(request): return request.get_host() Loading