mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #24603 -- Allowed Context.update() to be used as a context manager.
This commit is contained in:
@@ -171,8 +171,7 @@ class Context(BaseContext):
|
||||
"Pushes other_dict to the stack of dictionaries in the Context"
|
||||
if not hasattr(other_dict, '__getitem__'):
|
||||
raise TypeError('other_dict must be a mapping (dictionary-like) object.')
|
||||
self.dicts.append(other_dict)
|
||||
return other_dict
|
||||
return ContextDict(self, other_dict)
|
||||
|
||||
|
||||
class RenderContext(BaseContext):
|
||||
|
||||
Reference in New Issue
Block a user