Mention jinja2 include_block tag in 1.6 release notes

pull/2743/merge
Matt Westcott 2016-07-27 16:49:23 +01:00
rodzic c2548c5b30
commit 3c5c69138c
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -5,7 +5,7 @@ Changelog
~~~~~~~~~~~~~~~~
* Django 1.10 support
* Added the ``include_block`` template tag for improved StreamField template inclusion (Matt Westcott)
* Added the ``include_block`` template tag for improved StreamField template inclusion (Matt Westcott, Mikalai Radchuk)
* Page slugs now allow unicode on Django >= 1.9 (Behzad Nategh)
* Image upload form in image chooser now performs client side validation so that the selected file is not lost in the submission (Jack Paine)
* oEmbed URL for audioBoom was updated (Janneke Janssen)

Wyświetl plik

@ -20,7 +20,7 @@ Wagtail is now compatible with Django 1.10. Thanks to Mikalai Radchuk and Paul J
``{% include_block %}`` tag for improved StreamField template inclusion
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In previous releases, the standard way of rendering the HTML content of a StreamField was through a simple variable template tag, such as ``{{ page.body }}``. This had the drawback that any templates used in the StreamField rendering would not inherit variables from the parent template's context, such as ``page`` and ``request``. To address this, a new template tag ``{% include_block page.body %}`` has been introduced as the new recommended way of outputting Streamfield content - this replicates the behaviour of Django's ``{% include %}`` tag, passing on the full template context by default. For full documentation, see :ref:`streamfield_template_rendering`. This feature was developed by Matt Westcott.
In previous releases, the standard way of rendering the HTML content of a StreamField was through a simple variable template tag, such as ``{{ page.body }}``. This had the drawback that any templates used in the StreamField rendering would not inherit variables from the parent template's context, such as ``page`` and ``request``. To address this, a new template tag ``{% include_block page.body %}`` has been introduced as the new recommended way of outputting Streamfield content - this replicates the behaviour of Django's ``{% include %}`` tag, passing on the full template context by default. For full documentation, see :ref:`streamfield_template_rendering`. This feature was developed by Matt Westcott, and additionally ported to Jinja2 (see: :doc:`/advanced_topics/jinja2`) by Mikalai Radchuk.
Unicode page slugs