Django

Code

Ticket #4539: patch.2.diff

File patch.2.diff, 0.8 kB (added by permon, 1 year ago)

patch - updated

  • django/templatetags/i18n.py

    old new  
    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)