1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Made the new template.Context.flatten() method a public API.

That method was introduced in 9db4271bd1.

Refs #21765.
This commit is contained in:
Marek Wywiał
2014-02-16 14:50:27 +01:00
committed by Baptiste Mispelon
parent 57ba5bf97b
commit 8274fa60f8
4 changed files with 66 additions and 7 deletions

View File

@@ -636,6 +636,14 @@ Templates
parameters that are passed to the ``dict`` constructor used to build the new
context level.
* The new :meth:`Context.flatten() <django.template.Context.flatten>` method
returns a ``Context``'s stack as one flat dictionary.
* ``Context`` objects can now be compared for equality (internally, this
uses :meth:`Context.flatten() <django.template.Context.flatten>` so the
internal structure of each ``Context``'s stack doesn't matter as long as their
flattened version is identical).
* The :ttag:`widthratio` template tag now accepts an "as" parameter to capture
the result in a variable.