diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c7597cc63b..9f34d97569 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -15,6 +15,8 @@ Changelog * Added `ancestors` field to pages endpoint in admin API (Karl Hobley) * Removed Django admin management of `Page` & `Site` models (Andreas Bernacca) * Cleaned up Django docs URLs in documentation (Pete Andrew) + * Add StreamFieldPanel to available panel types in documentation (Dan Swain) + * Add {{ block.super }} example to ModelAdmin customisation in documentation (Dan Swain) * Fix: Rename documents listing column 'uploaded' to 'created' (LB (Ben Johnston)) * Fix: Submenu items longer then the page height are no longer broken by the submenu footer (Igor van Spengen) * Fix: Unbundle the l18n library as it was bundled to avoid installation errors which have been resolved (Matt Westcott) diff --git a/docs/reference/contrib/modeladmin/primer.rst b/docs/reference/contrib/modeladmin/primer.rst index 9393ed6cb8..6da3554270 100644 --- a/docs/reference/contrib/modeladmin/primer.rst +++ b/docs/reference/contrib/modeladmin/primer.rst @@ -162,7 +162,21 @@ each view: - ``'delete.html'`` for ``DeleteView`` - ``'choose_parent.html'`` for ``ChooseParentView`` -If for any reason you'd rather bypass this behaviour and explicitly specify a +To add extra information to a block within one of the above Wagtail templates, use Django's ``{{ block.super }}`` within the ``{% block ... %}`` that you wish to extend. For example, if you wish to display an image in an edit form below the fields of the model that is being edited, you could do the following: + +.. code-block:: html+django + + {% extends "modeladmin/edit.html" %} + {% load static %} + + {% block content %} + {{ block.super }} +
+ +
+ {% endblock %} + +If for any reason you'd rather bypass the above behaviour and explicitly specify a template for a specific view, you can set either of the following attributes on your ``ModelAdmin`` class: diff --git a/docs/releases/2.8.rst b/docs/releases/2.8.rst index 9e5f05229e..1966a52afa 100644 --- a/docs/releases/2.8.rst +++ b/docs/releases/2.8.rst @@ -24,6 +24,8 @@ Other features * Added ``ancestors`` field to pages endpoint in admin API (Karl Hobley) * Removed Django admin management of ``Page`` & ``Site`` models (Andreas Bernacca) * Cleaned up Django docs URLs in documentation (Pete Andrew) + * Add StreamFieldPanel to available panel types in documentation (Dan Swain) + * Add {{ block.super }} example to ModelAdmin customisation in documentation (Dan Swain) Bug fixes