Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Refactored the HttpResponse subclasses a tiny bit to use args and kwa…

…rgs instead of hard-coded init() params

git-svn-id: http://code.djangoproject.com/svn/django/trunk@591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit af8b7ffa8e8d797925694691873afb96a77cc6f2 1 parent e07fee6
@adrianholovaty adrianholovaty authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 django/utils/httpwrappers.py
View
16 django/utils/httpwrappers.py
@@ -200,21 +200,21 @@ def __init__(self):
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
Please sign in to comment.
Something went wrong with that request. Please try again.