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:
parent
3d426607a8
commit
9562cbbc49
|
@ -2,7 +2,6 @@ from Cookie import SimpleCookie
|
||||||
from pprint import pformat
|
from pprint import pformat
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
import datastructures
|
import datastructures
|
||||||
from django.conf.settings import DEFAULT_MIME_TYPE
|
|
||||||
|
|
||||||
class HttpRequest(object): # needs to be new-style class because subclasses define "property"s
|
class HttpRequest(object): # needs to be new-style class because subclasses define "property"s
|
||||||
"A basic HTTP request"
|
"A basic HTTP request"
|
||||||
|
@ -135,7 +134,10 @@ def parse_cookie(cookie):
|
||||||
|
|
||||||
class HttpResponse:
|
class HttpResponse:
|
||||||
"A basic HTTP response, with content and dictionary-accessed headers"
|
"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.content = content
|
||||||
self.headers = {'Content-Type':mimetype}
|
self.headers = {'Content-Type':mimetype}
|
||||||
self.cookies = SimpleCookie()
|
self.cookies = SimpleCookie()
|
||||||
|
|
Loading…
Reference in New Issue