Refactored the HttpResponse subclasses a tiny bit to use args and kwargs instead of hard-coded init() params
git-svn-id: http://code.djangoproject.com/svn/django/trunk@591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e07fee6511
commit
af8b7ffa8e
|
@ -200,21 +200,21 @@ class HttpResponseNotModified(HttpResponse):
|
||||||
self.status_code = 304
|
self.status_code = 304
|
||||||
|
|
||||||
class HttpResponseNotFound(HttpResponse):
|
class HttpResponseNotFound(HttpResponse):
|
||||||
def __init__(self, content='', mimetype=DEFAULT_MIME_TYPE):
|
def __init__(self, *args, **kwargs):
|
||||||
HttpResponse.__init__(self, content, mimetype)
|
HttpResponse.__init__(self, *args, **kwargs)
|
||||||
self.status_code = 404
|
self.status_code = 404
|
||||||
|
|
||||||
class HttpResponseForbidden(HttpResponse):
|
class HttpResponseForbidden(HttpResponse):
|
||||||
def __init__(self, content='', mimetype=DEFAULT_MIME_TYPE):
|
def __init__(self, *args, **kwargs):
|
||||||
HttpResponse.__init__(self, content, mimetype)
|
HttpResponse.__init__(self, *args, **kwargs)
|
||||||
self.status_code = 403
|
self.status_code = 403
|
||||||
|
|
||||||
class HttpResponseGone(HttpResponse):
|
class HttpResponseGone(HttpResponse):
|
||||||
def __init__(self, content='', mimetype=DEFAULT_MIME_TYPE):
|
def __init__(self, *args, **kwargs):
|
||||||
HttpResponse.__init__(self, content, mimetype)
|
HttpResponse.__init__(self, *args, **kwargs)
|
||||||
self.status_code = 410
|
self.status_code = 410
|
||||||
|
|
||||||
class HttpResponseServerError(HttpResponse):
|
class HttpResponseServerError(HttpResponse):
|
||||||
def __init__(self, content='', mimetype=DEFAULT_MIME_TYPE):
|
def __init__(self, *args, **kwargs):
|
||||||
HttpResponse.__init__(self, content, mimetype)
|
HttpResponse.__init__(self, *args, **kwargs)
|
||||||
self.status_code = 500
|
self.status_code = 500
|
||||||
|
|
Loading…
Reference in New Issue