diff options
| author | Tommy Beadle <tbeadle@arbor.net> | 2015-04-13 10:57:44 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-04-14 08:01:16 -0400 |
| commit | 6bfd864ff2a7d4903d485ee40094a1315da8221b (patch) | |
| tree | 26c51d352c9e8aa8b2b919c226a61401260f87f6 /django | |
| parent | c612786cf15e2e1d00162ed4e335e83b75e6c978 (diff) | |
Fixed #24603 -- Allowed Context.update() to be used as a context manager.
Diffstat (limited to 'django')
| -rw-r--r-- | django/template/context.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/template/context.py b/django/template/context.py index 2434b31a68..778a83d7a3 100644 --- a/django/template/context.py +++ b/django/template/context.py @@ -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): |
