Refs #24324 -- Fixed crash in {% debug %} tag on Python 2.

If Django is installed in a path that contains non-ASCII characters,
the tag failed with UnicodeDecodeError.
This commit is contained in:
Tim Graham 2015-02-16 08:54:25 -05:00
parent 307c0f299a
commit 098fa12dd3
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ class DebugNode(Node):
from pprint import pformat
output = [force_text(pformat(val)) for val in context]
output.append('\n\n')
output.append(pformat(sys.modules))
output.append(force_text(pformat(sys.modules)))
return ''.join(output)