Ticket #4539: patch.2.diff

File patch.2.diff, 798 bytes (added by Tomáš Kopeček, 17 years ago)

patch - updated

  • django/templatetags/i18n.py

     
    6060        return ''.join(result)
    6161
    6262    def render(self, context):
    63         context.push()
     63        tmp_context = {}
    6464        for var,val in self.extra_context.items():
    65             context[var] = val.resolve(context)
     65            tmp_context[var] = val.resolve(context)
     66        # update works as a push, so corresponding context.pop() is
     67        # at the end of function
     68        context.update(tmp_context)
    6669        singular = self.render_token_list(self.singular)
    6770        if self.plural and self.countervar and self.counter:
    6871            count = self.counter.resolve(context)
Back to Top