1
0
mirror of https://github.com/django/django.git synced 2025-10-29 00:26:07 +00:00

Fixed #23060 -- Prevented UnicodeDecodeError in debug templatetag

This commit is contained in:
qingfeng
2014-07-22 01:38:34 +08:00
committed by Claude Paroz
parent 90faa196f6
commit 08451f17d0
2 changed files with 11 additions and 1 deletions

View File

@@ -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)