mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
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 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()
|
||||
|
Loading…
Reference in New Issue
Block a user