summaryrefslogtreecommitdiff
path: root/django/http/__init__.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-07-01 05:55:01 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-07-01 05:55:01 +0000
commita61d4ebd5f4b49b296063eae603faa3c456d26e5 (patch)
tree3b88cfd1865e4a77400ec2becddaf93851f27f57 /django/http/__init__.py
parentb89d409bf7ed7f9d6248c1ec188e241bdf5d4aa2 (diff)
unicode: Merged changes from trunk up to [5579].
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5580 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 b5af9b6e6a..76f9246ca6 100644
--- a/django/http/__init__.py
+++ b/django/http/__init__.py
@@ -214,7 +214,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:
@@ -227,6 +227,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"