diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-06-17 10:25:48 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-06-17 10:25:48 +0000 |
| commit | 2126d41aba06b50a288cc6a516d4531ced998822 (patch) | |
| tree | 2ed0e56153471e6076903c99fda834a5f78dd364 /django/http/__init__.py | |
| parent | 1bfcfe615c65565da5009a205aecff394217717c (diff) | |
unicode: Render templates as unicode objects and only convert them to
bytestrings as part of HttpRespnose and other output paths.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/http/__init__.py')
| -rw-r--r-- | django/http/__init__.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py index 834c3e625e..b5af9b6e6a 100644 --- a/django/http/__init__.py +++ b/django/http/__init__.py @@ -271,9 +271,7 @@ class HttpResponse(object): self.cookies[key]['max-age'] = 0 def _get_content(self): - content = ''.join(self._container) - if isinstance(content, unicode): - content = content.encode(self._charset) + content = smart_str(''.join(self._container), self._charset) return content def _set_content(self, value): |
