Ticket #2359: variable-node.diff

File variable-node.diff, 991 bytes (added by mir@…, 17 years ago)

see comment 17

  • django/template/__init__.py

    diff --git a/django/template/__init__.py b/django/template/__init__.py
    index 2992036..30a75fc 100644
    a b class VariableNode(Node):  
    794794        return "<Variable Node: %s>" % self.filter_expression
    795795
    796796    def render(self, context):
    797         output = force_unicode(self.filter_expression.resolve(context))
     797        output = self.filter_expression.resolve(context)
    798798        if (context.autoescape and not isinstance(output, SafeData)) or isinstance(output, EscapeData):
    799799            return escape(output)
    800800        else:
    class VariableNode(Node):  
    803803class DebugVariableNode(VariableNode):
    804804    def render(self, context):
    805805        try:
    806             output = force_unicode(self.filter_expression.resolve(context))
     806            output = self.filter_expression.resolve(context)
    807807        except TemplateSyntaxError, e:
    808808            if not hasattr(e, 'source'):
    809809                e.source = self.source
Back to Top