Unreleased
---
local:
depth: 1
---
OpenSearch is now formally supported as an alternative to Elasticsearch. For configuration details, see OpenSearch configuration.
wagtailcache
and wagtailpagecache
template tags to ensure previewing Pages or Snippets will not be cached (Jake Howard)field.html
template (Sage Abdullah)SnippetViewSet
menu registration mechanism to base ViewSet
class (Sage Abdullah)ModelViewSet
(Sage Abdullah)SnippetViewSet
template override mechanism to ModelViewSet
(Sage Abdullah)SnippetViewSet.list_display
to ModelViewSet
(Sage Abdullah)wagtail.publish
log action on aliases when they are created from live source pages or the source page is published (Dan Braghis)wagtail.unpublish
log action on aliases when source page is unpublished (Dan Braghis)IndexView
(Sage Abdullah)list_filter
, filterset_class
, search_fields
, search_backend_name
, list_export
, export_filename
, list_per_page
, and ordering
from SnippetViewSet
to ModelViewSet
(Sage Abdullah)IndexView
and CreateView
(Sage Abdullah)IndexView.export_headings
via ModelViewSet
(Christer Jensen, Sage Abdullah)get_object_list
method on ChooserViewSet
(Matt Westcott)linked_fields
mechanism on chooser widgets to allow choices to be limited by fields on the calling page (Matt Westcott)TableBlock
with the mergedCells
option (Gareth Palmer)InlinePanel
, focus will now shift to that content similar to StreamField
(Faishal Manzar)placement
in human_readable_date
the tooltip template tag (Rohit Sharma)FieldBlock
s correctly set the required
and aria-describedby
attributes (Storm Heg)PublishMenuItem
to more easily support overriding its label via construct_page_action_menu
(Sébastien Corbin)WAGTAILADMIN_BASE_URL
on "Integrating Wagtail into a Django project" page (Shreshth Srivastava)WagtailTestUtils.get_soup()
method for testing HTML content (Storm Heg, Sage Abdullah)ViewSet
subclasses to customise url_prefix
and url_namespace
logic (Matt Westcott)SnippetViewSet
registration code (Sage Abdullah)IndexView.results_template_name
to results.html
(Sage Abdullah)w-bulk
Stimulus implementation (LB (Ben) Johnston)w-message
controller (LB (Ben) Johnston, Hussain Saherwala)stubs.js
to prevent Storybook from crashing (LB (Ben) Johnston)slim_header.html
template (Sage Abdullah)slim_header.html
template to reduce code duplication (Sage Abdullah)imghdr
(Jake Howard)imghdr
with Willow's built-in MIME type detection (Jake Howard)data-tippy
HTML attribute usage to the Stimulus data-*-value attributes for w-tooltip & w-dropdown (Subhajit Ghosh, LB (Ben) Johnston)@total_ordering
usage with comparison functions implementation (Virag Jain)<script type="text/django-form-template"><-/script>
template approach with HTML template
elements in InlinePanel and expanding formset (Mansi Gundre, Subhajit Ghosh, LB (Ben) Johnston)imghdr
is deprecated, and will be removed in Python 3.13.
Wagtail now uses the Willow feature of providing the image MIME type, which uses the filetype
package.
Models that are registered with a ModelViewSet
now have reference index tracking enabled by default. This means that you no longer need to call ReferenceIndex.register_model()
in your app's ready()
method for such models. If this is undesired, you can disable it by setting {attr}~wagtail.admin.viewsets.model.ModelViewSet.add_to_reference_index
to False
on the ModelViewSet
subclass. For more details, see [](managing_the_reference_index).
The IndexView
's results_template_name
attribute in the GroupViewSet
has been renamed from wagtailusers/groups/results.html
to wagtailusers/groups/index_results.html
for consistency with the other viewsets. If you have customised or extended the template, e.g. for [](customising_group_views), you will need to rename it to match the new name.
If using custom styling for the breadcrumbs, this class has changed from singular to plural for a more intuitive class.
Old | New |
---|---|
'w-breadcrumb' |
'w-breadcrumbs' |
The undocumented JavaScript implementation for the header breadcrumbs component has been migrated to a Stimulus controller and now uses different data attributes.
This may impact custom header implementations that relied on the previous approach, custom breadcrumbs that did not use breadcrumbs
and require the expand/collapse behaviour may be impacted.
Old | New |
---|---|
'wagtail:breadcrumbs-expand' |
'w-breadcrumbs:opened' |
'wagtail:breadcrumbs-collapse' |
'w-breadcrumbs:closed' |
Old | New |
---|---|
data-breadcrumb-next |
data-controller="w-breadcrumbs" |
data-toggle-breadcrumbs |
data-w-breadcrumbs-target="toggle" data-action="w-breadcrumbs#toggle mouseenter->w-breadcrumbs#peek" |
data-breadcrumb-item |
data-w-breadcrumbs-target="content" |
Note that the root DOM element also includes a set of additional data attributes to function as the breadcrumbs:
data-controller="w-breadcrumbs"
data-action="keyup.esc@document->w-breadcrumbs#close w-breadcrumbs:open@document->w-breadcrumbs#open w-breadcrumbs:close@document->w-breadcrumbs#close"
data-w-breadcrumbs-close-icon-class="icon-cross"
data-w-breadcrumbs-closed-value="true"
data-w-breadcrumbs-open-icon-class="icon-breadcrumb-expand"
data-w-breadcrumbs-opened-content-class="w-max-w-4xl"
data-w-breadcrumbs-peek-target-value="header"
The undocumented global util window.updateFooterSaveWarning
has been removed, this is part of the footer 'unsaved' messages toggling behaviour on page forms.
This behaviour has now moved to a Stimulus controller and leverages DOM events instead. Calling this function will do nothing and in a future release will throw an error.
You can implement roughly the equivalent functionality with this JavaScript function, however, this will not be guaranteed to work in future releases.
window.updateFooterSaveWarning = (formDirty, commentsDirty) => {
if (!formDirty && !commentsDirty) {
document.dispatchEvent(new CustomEvent('w-unsaved:clear'));
} else {
const [type] = [
formDirty && commentsDirty && 'all',
commentsDirty && 'comments',
formDirty && 'edits',
].filter(Boolean);
document.dispatchEvent(new CustomEvent('w-unsaved:add', { detail: { type } }));
}
};
The templates for the snippets views have been refactored to reuse the shared slim_header.html
template. If you have customised or extended the templates, e.g. for [](wagtailsnippets_custom_admin_views), you will need to update them to match the new structure. As a result, the following templates have been removed:
wagtailsnippets/snippets/headers/_base_header.html
wagtailsnippets/snippets/headers/create_header.html
wagtailsnippets/snippets/headers/history_header.html
wagtailsnippets/snippets/headers/list_header.html
wagtailsnippets/snippets/headers/usage_header.html
In most cases, the usage of those templates can be replaced with the wagtailadmin/shared/headers/slim_header.html
template. Refer to the snippets views and templates code for more details.
The naming conventions for tippy
related attributes have been updated to align with the generic tooltip
naming.
If you are using the undocumented dropdown template tag with the offset arg, this will need to be updated.
Old | New |
---|---|
{% dropdown toggle_tippy_offset="[0, -2]" %}...{% enddropdown %} |
{% dropdown toggle_tooltip_offset="[0, -2]" %}...{% enddropdown %} |