Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 9562cbbc493735a1535844a7a10951f55da67bb8 1 parent 3d42660
@adrianholovaty adrianholovaty authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 django/utils/httpwrappers.py
View
6 django/utils/httpwrappers.py
@@ -2,7 +2,6 @@
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()
Please sign in to comment.
Something went wrong with that request. Please try again.