summaryrefslogtreecommitdiff
path: root/django/http/__init__.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-07-01 01:17:51 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-07-01 01:17:51 +0000
commit6f4e933fcc78da11ec43214efd3472192030eced (patch)
treed92140118d3afa00bcd909f475dd1a694c15c08f /django/http/__init__.py
parent7a981380def046f753ff70a7c25efcd781ff6ac6 (diff)
newforms-admin: Merged to [5571]
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@5572 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/http/__init__.py')
-rw-r--r--django/http/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py
index ca3b5eab24..1b2abe5049 100644
--- a/django/http/__init__.py
+++ b/django/http/__init__.py
@@ -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 @@ class HttpResponse(object):
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"