From 9562cbbc493735a1535844a7a10951f55da67bb8 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 23 Sep 2005 13:24:52 +0000 Subject: [PATCH] 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 --- django/utils/httpwrappers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/django/utils/httpwrappers.py b/django/utils/httpwrappers.py index f4a7c54f0c4..2312891b6ae 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()