mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Allowed Context.push to behave as a context mananger.
Thanks Loic Bistuer for the review.
This commit is contained in:
committed by
Tim Graham
parent
828359e52d
commit
a3e7d73ed7
@@ -60,6 +60,13 @@ Minor features
|
||||
* :attr:`~django.db.models.Options.app_label` is no longer required for models
|
||||
that are defined in a ``models`` package within an app.
|
||||
|
||||
* The :meth:`Context.push() <django.template.Context.push>` method now returns
|
||||
a context manager which automatically calls :meth:`pop()
|
||||
<django.template.Context.pop>` upon exiting the ``with`` statement.
|
||||
Additionally, :meth:`push() <django.template.Context.push>` now accepts
|
||||
parameters that are passed to the ``dict`` constructor used to build the new
|
||||
context level.
|
||||
|
||||
Backwards incompatible changes in 1.7
|
||||
=====================================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user