mirror of
https://github.com/django/django.git
synced 2025-09-30 14:01:21 +00:00
[1.8.x] Documented Context.get() method.
Backport of 4d9414098b
from master
This commit is contained in:
parent
09062e9509
commit
ff71d6b8de
1 changed files with 5 additions and 0 deletions
|
@ -415,6 +415,11 @@ dictionary syntax::
|
||||||
>>> c['newvariable']
|
>>> c['newvariable']
|
||||||
'hello'
|
'hello'
|
||||||
|
|
||||||
|
.. method:: Context.get(key, otherwise=None)
|
||||||
|
|
||||||
|
Returns the value for ``key`` if ``key`` is in the context, else returns
|
||||||
|
``otherwise``.
|
||||||
|
|
||||||
.. method:: Context.pop()
|
.. method:: Context.pop()
|
||||||
.. method:: Context.push()
|
.. method:: Context.push()
|
||||||
.. exception:: ContextPopException
|
.. exception:: ContextPopException
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue