Promote include_block and unicode page slugs to major features

This commit is contained in:
Matt Westcott 2016-07-07 11:20:43 +01:00
parent cbabc3d9c7
commit be1e1927c5
3 changed files with 15 additions and 3 deletions

View file

@ -5,6 +5,7 @@ Changelog
~~~~~~~~~~~~~~~~
* Django 1.10 support
* Added the ``include_block`` template tag for improved StreamField template inclusion (Matt Westcott)
* 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)
@ -20,7 +21,6 @@ Changelog
* Added a system check to validate that fields listed in `search_fields` are defined on the model (Josh Schneier)
* Added formal APIs for customising the display of StructBlock forms within the page editor (Matt Westcott)
* `wagtailforms.models.AbstractEmailForm` now supports multiple email recipients (Serafeim Papastefanos)
* Added the ``include_block`` template tag for improved StreamField template inclusion (Matt Westcott)
* Added ability to delete users through Settings -> Users (Vincent Audebert; thanks also to Ludolf Takens and Tobias Schmidt for alternative implementations)
* Page previews now pass additional HTTP headers, to simulate the page being viewed by the logged-in user and avoid clashes with middleware (Robert Rollins)
* Fix: Email templates and document uploader now support custom `STATICFILES_STORAGE` (Jonny Scholes)

View file

@ -17,10 +17,21 @@ Django 1.10 support
Wagtail is now compatible with Django 1.10. Thanks to Mikalai Radchuk and Paul J Stevens for developing this, and to Tim Graham for reviewing and additional Django core assistance.
``{% 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.
Unicode page slugs
~~~~~~~~~~~~~~~~~~
Page URL slugs can now contain Unicode characters, when using Django 1.9 or above. This feature was developed by Behzad Nategh.
Minor features
~~~~~~~~~~~~~~
* 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)
* Remember tree location in page chooser when switching between Internal / External / Email link (Matt Westcott)
@ -35,7 +46,6 @@ Minor features
* Added a system check to validate that fields listed in ``search_fields`` are defined on the model (Josh Schneier)
* Added formal APIs for customising the display of StructBlock forms within the page editor - see :ref:`custom_editing_interfaces_for_structblock` (Matt Westcott)
* ``wagtailforms.models.AbstractEmailForm`` now supports multiple email recipients (Serafeim Papastefanos)
* Added the ``include_block`` template tag for improved StreamField template inclusion. See :doc:`/topics/streamfield` for documentation (Matt Westcott)
* Added ability to delete users through Settings -> Users (Vincent Audebert; thanks also to Ludolf Takens and Tobias Schmidt for alternative implementations)
* Page previews now pass additional HTTP headers, to simulate the page being viewed by the logged-in user and avoid clashes with middleware (Robert Rollins)

View file

@ -388,6 +388,8 @@ Since ``StreamField`` accepts an instance of ``StreamBlock`` as a parameter, in
carousel = StreamField(CarouselBlock())
.. _streamfield_template_rendering:
Template rendering
------------------