Add note about variable names to Jinja2 release notes

pull/1828/head
Matt Westcott 2015-10-14 15:25:40 +01:00
rodzic c1edbe6a98
commit 9b6a389850
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -15,6 +15,8 @@ Jinja2 support
The core templatetags (``pageurl``, ``slugurl``, ``image``, ``richtext`` and ``wagtailuserbar``) are now compatible with Jinja2 so it's now possible to use Jinja2 as the template engine for your Wagtail site.
Note that the variable name ``self`` is reserved in Jinja2, and so Wagtail now provides alternative variable names where ``self`` was previously used: ``page`` to refer to page objects, and ``value`` to refer to StreamField blocks. All code examples in this documentation have now been updated to use the new variable names, for compatibility with Jinja2; however, users of the default Django template engine can continue to use ``self``.
See: :doc:`/advanced_topics/jinja2`