Ticket #3749: FilterNode.patch

File FilterNode.patch, 600 bytes (added by Zak Johnson <zakj@…>, 18 years ago)
  • django/template/defaulttags.py

     
    4141    def render(self, context):
    4242        output = self.nodelist.render(context)
    4343        # apply filters
    44         return self.filter_expr.resolve(Context({'var': output}))
     44        context.update({'var': output})
     45        filtered = self.filter_expr.resolve(context)
     46        context.pop()
     47        return filtered
    4548
    4649class FirstOfNode(Node):
    4750    def __init__(self, vars):
Back to Top