diff options
| author | Tim Graham <timograham@gmail.com> | 2015-02-16 08:54:25 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-18 07:35:56 -0500 |
| commit | 1153bccc1bc654a547a310d0614b989606d25950 (patch) | |
| tree | 44af284c84352bb2aaaf60e41df537bb08ea0da4 | |
| parent | 2aa06e439a29a1c24fa03744395cc57787e7198e (diff) | |
[1.8.x] 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.
Backport of 098fa12dd390e733c7568d824eea2c346550c75a from master
| -rw-r--r-- | django/template/defaulttags.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py index da68ec6a66..0dc6735ad6 100644 --- a/django/template/defaulttags.py +++ b/django/template/defaulttags.py @@ -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) |
