From 2126d41aba06b50a288cc6a516d4531ced998822 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 17 Jun 2007 10:25:48 +0000 Subject: 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 --- django/http/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'django/http') 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): -- cgit v1.3