mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[1.6.x] Fixed #21515 -- Corrected example of template.Context in documentation.
Thanks to trac user oubiga for the report.
Backport of 077af42139 from master.
This commit is contained in:
@@ -311,10 +311,12 @@ If you ``pop()`` too much, it'll raise
|
|||||||
>>> c = Context()
|
>>> c = Context()
|
||||||
>>> c['foo'] = 'first level'
|
>>> c['foo'] = 'first level'
|
||||||
>>> c.push()
|
>>> c.push()
|
||||||
|
{}
|
||||||
>>> c['foo'] = 'second level'
|
>>> c['foo'] = 'second level'
|
||||||
>>> c['foo']
|
>>> c['foo']
|
||||||
'second level'
|
'second level'
|
||||||
>>> c.pop()
|
>>> c.pop()
|
||||||
|
{'foo': 'second level'}
|
||||||
>>> c['foo']
|
>>> c['foo']
|
||||||
'first level'
|
'first level'
|
||||||
>>> c['foo'] = 'overwritten'
|
>>> c['foo'] = 'overwritten'
|
||||||
|
|||||||
Reference in New Issue
Block a user