summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-10-06 02:27:08 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-10-06 02:27:08 +0000
commitab9aacd4db5d1e69ff2c78bae69fcabe5252d395 (patch)
treed09b59dfbf42b700223f474937fb27fd9d02ea2a /django/utils
parent261ab166cef09497ab2204442e74246758341135 (diff)
Fixed #333 and #440 -- Split DEFAULT_MIME_TYPE setting into DEFAULT_CONTENT_TYPE and DEFAULT_CHARSET. Thanks, Maniac.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@786 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/httpwrappers.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/utils/httpwrappers.py b/django/utils/httpwrappers.py
index eeebda565d..5f9362bd24 100644
--- a/django/utils/httpwrappers.py
+++ b/django/utils/httpwrappers.py
@@ -1,7 +1,7 @@
from Cookie import SimpleCookie
from pprint import pformat
from urllib import urlencode
-import datastructures
+from django.utils import datastructures
class HttpRequest(object): # needs to be new-style class because subclasses define "property"s
"A basic HTTP request"
@@ -139,8 +139,8 @@ class HttpResponse:
"A basic HTTP response, with content and dictionary-accessed headers"
def __init__(self, content='', mimetype=None):
if not mimetype:
- from django.conf.settings import DEFAULT_MIME_TYPE
- mimetype = DEFAULT_MIME_TYPE
+ from django.conf.settings import DEFAULT_CONTENT_TYPE, DEFAULT_CHARSET
+ mimetype = "%s; charset=%s" % (DEFAULT_CONTENT_TYPE, DEFAULT_CHARSET)
self.content = content
self.headers = {'Content-Type':mimetype}
self.cookies = SimpleCookie()