summaryrefslogtreecommitdiff
path: root/django/utils/httpwrappers.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-09-23 13:24:52 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-09-23 13:24:52 +0000
commit9562cbbc493735a1535844a7a10951f55da67bb8 (patch)
tree8291274fcee5fae70566c2a6730552f6bf7e2874 /django/utils/httpwrappers.py
parent3d426607a8e04f79fb4ee4393e92c4838539bd23 (diff)
Fixed #543 -- Fixed broken mod_python support due to an import in the wrong place
git-svn-id: http://code.djangoproject.com/svn/django/trunk@672 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/httpwrappers.py')
-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()