summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/utils/httpwrappers.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/django/utils/httpwrappers.py b/django/utils/httpwrappers.py
index f4a7c54f0c..2312891b6a 100644
--- a/django/utils/httpwrappers.py
+++ b/django/utils/httpwrappers.py
@@ -2,7 +2,6 @@ from Cookie import SimpleCookie
from pprint import pformat
from urllib import urlencode
import datastructures
-from django.conf.settings import DEFAULT_MIME_TYPE
class HttpRequest(object): # needs to be new-style class because subclasses define "property"s
"A basic HTTP request"
@@ -135,7 +134,10 @@ def parse_cookie(cookie):
class HttpResponse:
"A basic HTTP response, with content and dictionary-accessed headers"
- def __init__(self, content='', mimetype=DEFAULT_MIME_TYPE):
+ def __init__(self, content='', mimetype=None):
+ if not mimetype:
+ from django.conf.settings import DEFAULT_MIME_TYPE
+ mimetype = DEFAULT_MIME_TYPE
self.content = content
self.headers = {'Content-Type':mimetype}
self.cookies = SimpleCookie()