mirror of https://github.com/django/django.git
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
|
||||
|
||||
class HttpResponseNotFound(HttpResponse):
|
||||
def __init__(self, content='', mimetype=DEFAULT_MIME_TYPE):
|
||||
HttpResponse.__init__(self, content, mimetype)
|
||||
def __init__(self, *args, **kwargs):
|
||||
HttpResponse.__init__(self, *args, **kwargs)
|
||||
self.status_code = 404
|
||||
|
||||
class HttpResponseForbidden(HttpResponse):
|
||||
def __init__(self, content='', mimetype=DEFAULT_MIME_TYPE):
|
||||
HttpResponse.__init__(self, content, mimetype)
|
||||
def __init__(self, *args, **kwargs):
|
||||
HttpResponse.__init__(self, *args, **kwargs)
|
||||
self.status_code = 403
|
||||
|
||||
class HttpResponseGone(HttpResponse):
|
||||
def __init__(self, content='', mimetype=DEFAULT_MIME_TYPE):
|
||||
HttpResponse.__init__(self, content, mimetype)
|
||||
def __init__(self, *args, **kwargs):
|
||||
HttpResponse.__init__(self, *args, **kwargs)
|
||||
self.status_code = 410
|
||||
|
||||
class HttpResponseServerError(HttpResponse):
|
||||
def __init__(self, content='', mimetype=DEFAULT_MIME_TYPE):
|
||||
HttpResponse.__init__(self, content, mimetype)
|
||||
def __init__(self, *args, **kwargs):
|
||||
HttpResponse.__init__(self, *args, **kwargs)
|
||||
self.status_code = 500
|
||||
|
|
Loading…
Reference in New Issue