Ticket #18103: context.diff

File context.diff, 754 bytes (added by Vinay Sajip, 13 years ago)

Suggested change to django.template.context.BaseContext._reset_dicts

  • django/template/context.py

    diff --git a/django/template/context.py b/django/template/context.py
    a b  
    1919        self._reset_dicts(dict_)
    2020
    2121    def _reset_dicts(self, value=None):
    22         builtins = {'True': True, 'False': False, 'None': None}
    23         if value:
    24             builtins.update(value)
    25         self.dicts = [builtins]
     22        value = copy(value or {})
     23        value.update({'True': True, 'False': False, 'None': None})
     24        #builtins = {'True': True, 'False': False, 'None': None}
     25        #if value:
     26        #    builtins.update(value)
     27        #self.dicts = [builtins]
     28        self.dicts = [value]
    2629
    2730    def __copy__(self):
    2831        duplicate = copy(super(BaseContext, self))
Back to Top