summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorqingfeng <qingfenghello@gmail.com>2014-07-22 01:38:34 +0800
committerClaude Paroz <claude@2xlibre.net>2014-07-26 18:03:19 +0200
commit08451f17d08486055542daecdcc3be1779f0815b (patch)
tree4f5c1882eee336848ad44e26d62e3db0a527d96d /django
parent90faa196f67863370a4682ecfd053e189cd46705 (diff)
Fixed #23060 -- Prevented UnicodeDecodeError in debug templatetag
Diffstat (limited to 'django')
-rw-r--r--django/template/defaulttags.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index ceeb7f3335..2ce8f3633c 100644
--- a/django/template/defaulttags.py
+++ b/django/template/defaulttags.py
@@ -87,7 +87,7 @@ class CycleNode(Node):
class DebugNode(Node):
def render(self, context):
from pprint import pformat
- output = [pformat(val) for val in context]
+ output = [force_text(pformat(val)) for val in context]
output.append('\n\n')
output.append(pformat(sys.modules))
return ''.join(output)