What actually happens: a `KeyError` is raised:
{{{
>>> from django.template import Context
>>> c = Context({'foo': 'bar'})
>>> c['foo']
'bar'
>>> del c['foo']
>>> c['foo']
Traceback (most recent call last):
...
KeyError: 'foo'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24600>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: pat.keeps.looking.up@… (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/24600#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"3acefcefeb5283473ac35d7e842027814d57d574" 3acefce]:
{{{
#!CommitTicketReference repository=""
revision="3acefcefeb5283473ac35d7e842027814d57d574"
Fixed #24600 -- Fixed inaccurate example in template Context docs.
Thanks pattypatpat for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24600#comment:2>
Comment (by Tim Graham <timograham@…>):
In [changeset:"51e5e2efc6f96166ec3df6fe52a41deefe0fcbe3" 51e5e2e]:
{{{
#!CommitTicketReference repository=""
revision="51e5e2efc6f96166ec3df6fe52a41deefe0fcbe3"
[1.7.x] Fixed #24600 -- Fixed inaccurate example in template Context docs.
Thanks pattypatpat for the report.
Backport of 3acefcefeb5283473ac35d7e842027814d57d574 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24600#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"9e87017a38cbe9de555000278835d8229b1c5bb2" 9e87017a]:
{{{
#!CommitTicketReference repository=""
revision="9e87017a38cbe9de555000278835d8229b1c5bb2"
[1.8.x] Fixed #24600 -- Fixed inaccurate example in template Context docs.
Thanks pattypatpat for the report.
Backport of 3acefcefeb5283473ac35d7e842027814d57d574 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24600#comment:4>