Ticket #10190: charset_without_mimetype.diff
File charset_without_mimetype.diff, 1.0 KB (added by , 15 years ago) |
---|
-
django/http/__init__.py
272 272 status_code = 200 273 273 274 274 def __init__(self, content='', mimetype=None, status=None, 275 content_type=None ):275 content_type=None, charset=None): 276 276 from django.conf import settings 277 self._charset = settings.DEFAULT_CHARSET 277 self._charset = charset 278 if not self._charset: 279 self._charset = settings.DEFAULT_CHARSET 278 280 if mimetype: 279 281 content_type = mimetype # For backwards compatibility 280 282 if not content_type: 281 content_type = "%s; charset=%s" % (settings.DEFAULT_CONTENT_TYPE, 282 settings.DEFAULT_CHARSET) 283 content_type = "%s" % settings.DEFAULT_CONTENT_TYPE 283 284 if not isinstance(content, basestring) and hasattr(content, '__iter__'): 284 285 self._container = content 285 286 self._is_string = False