summaryrefslogtreecommitdiff
path: root/django/template/debug.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/template/debug.py')
-rw-r--r--django/template/debug.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/template/debug.py b/django/template/debug.py
index c58c854858..382fb75ebd 100644
--- a/django/template/debug.py
+++ b/django/template/debug.py
@@ -2,6 +2,7 @@ from django.template import Lexer, Parser, tag_re, NodeList, VariableNode, Templ
from django.utils.encoding import force_unicode
from django.utils.html import escape
from django.utils.safestring import SafeData, EscapeData
+from django.utils.formats import localize
class DebugLexer(Lexer):
def __init__(self, template_string, origin):
@@ -84,7 +85,9 @@ class DebugNodeList(NodeList):
class DebugVariableNode(VariableNode):
def render(self, context):
try:
- output = force_unicode(self.filter_expression.resolve(context))
+ output = self.filter_expression.resolve(context)
+ output = localize(output)
+ output = force_unicode(output)
except TemplateSyntaxError, e:
if not hasattr(e, 'source'):
e.source = self.source