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
This commit is contained in:
Adrian Holovaty 2005-09-23 13:24:52 +00:00
parent 3d426607a8
commit 9562cbbc49
1 changed files with 4 additions and 2 deletions

View File

@ -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()