mirror of
https://github.com/django/django.git
synced 2025-10-30 00:56:09 +00:00
Fixed #17229 -- Allow 'True', 'False' and 'None' to resolve to the corresponding Python objects in templates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -18,7 +18,10 @@ class BaseContext(object):
|
||||
self._reset_dicts(dict_)
|
||||
|
||||
def _reset_dicts(self, value=None):
|
||||
self.dicts = [value or {}]
|
||||
builtins = {'True': True, 'False': False, 'None': None}
|
||||
if value:
|
||||
builtins.update(value)
|
||||
self.dicts = [builtins]
|
||||
|
||||
def __copy__(self):
|
||||
duplicate = copy(super(BaseContext, self))
|
||||
|
||||
Reference in New Issue
Block a user