Permalink
Showing with 3 additions and 1 deletion.
  1. +3 −1 django/http/__init__.py
View
@@ -162,7 +162,7 @@ class HttpResponse(object):
status_code = 200
- def __init__(self, content='', mimetype=None):
+ def __init__(self, content='', mimetype=None, status=None):
from django.conf import settings
self._charset = settings.DEFAULT_CHARSET
if not mimetype:
@@ -175,6 +175,8 @@ def __init__(self, content='', mimetype=None):
self._is_string = True
self.headers = {'Content-Type': mimetype}
self.cookies = SimpleCookie()
+ if status:
+ self.status_code = status
def __str__(self):
"Full HTTP message, including headers"

0 comments on commit 7dc8b1a

Please sign in to comment.