Unreleased
---
local:
depth: 1
---
Wagtail now provides a set of utilities for creating data migrations on StreamField data. For more information, see StreamField data migrations. This feature was developed by Sandil Ranasinghe, initially as the wagtail-streamfield-migration-toolkit add-on package, as part of the Google Summer of Code 2022 initiative, with support from Jacob Topp-Mugglestone, Joshua Munn and Karl Hobley.
Snippets can now be locked by users to prevent other users from editing, through the use of the LockableMixin
. For more details, see [](wagtailsnippets_locking_snippets).
This feature was developed by Sage Abdullah.
fullpageurl
template tagWagtail now provides a fullpageurl
template tag (for both Django templates and Jinja2) to output a page's full URL including the domain. For more details, see [](fullpageurl_tag).
This feature was developed by Jake Howard.
WagtailPageTestCase.assertCanCreate
now supports the kwarg publish=True
to check publish redirection (Harry Percival, Akua Dokua Asiedu)rebuild_references_index
command can run without console output if called with --verbosity 0
(Omerzahid Ali, Aman Pandey)button bicolor button--icon button-secondary
including the button-small
variant (Seremba Patrick)purge_embeds
management command to delete all the cached embed objects in the database (Aman Pandey)form_fields
as an APIField on FormPage
(Sævar Öfjörð Magnússon, Suyash Singh, LB (Ben) Johnston)DraftStateMixin
now automatically define a "Publish" permission type (Sage Abdullah)azure-mgmt-cdn
version >= 10 and azure-mgmt-frontdoor
version >= 1 in the frontend cache invalidator (Sylvain Fankhauser)ChooserBlock.extract_references
uses the model class, not the model string (Alex Tomkins)InlinePanel
inner fields to avoid lost or incorrectly linked comments (Jacob Topp-Mugglestone)WAGTAILIMAGES_FEATURE_DETECTION_ENABLED
to avoid errors for images that do not exist (Aman Pandey)cc
, bcc
and reply_to
to the Django mail helper from wagtail.admin.mail.send_mail
(Ben Gosney)DecimalBlock
correctly handles None
, when required=False
, values (Natarajan Balaji)fnm
over nvm
in development documentation (LB (Ben) Johnston)request
and current_site
to get_url
on the performance documentation page (Jake Howard)register_user_listing_buttons
hook (LB (Ben Johnston))page models
usage guide (Damilola Oladele)register_image_operations
and add an example of a custom Image filter (Coen van der Kamp)RichTextField
(Matt Westcott)testapp
migrations (Matt Westcott)escapeHtml
function (Jordan Rob)initButtonSelects
from core.js to own TypesScript file and add unit tests (Loveth Omokaro)initSkipLink
util to TypeScript and add JSDoc & unit tests (Juliet Adeboye)unlist
to Tailwind utility class w-list-none
(Loveth Omokaro)hasOwn
in TypeScript (Loveth Omokaro)initTooltips
to TypeScript add JSDoc and unit tests (Fatuma Abdullahi)initTagField
from core.js to own TypeScript file and add unit tests (Chisom Okeoma)initDissmisibles
(Yekasumah)classname
for passing HTML class attributes (LB (Ben Johnston))InlinePanel
JavaScript initialisation code and adopt a class approach (Matt Westcott)identity
JavaScript util into shared utils folder (LB (Ben Johnston))URLSearchParams
(Loveth Omokaro)tsconfig
to better support modern TypeScript development and clean up some code quality issues via Eslint (Loveth Omokaro)WagtailImageField
)The AbstractImage
and AbstractRendition
models use a Wagtail-specific WagtailImageField
which extends Django's ImageField
to use Willow for image file handling. This will generate a new migration if you
are using a custom image model
InlinePanel
not supportedWhen the commenting system was introduced, support for InlinePanel
fields was incorrectly added. This has lead to issues
where comments can be lost on save or in most cases will be added to the incorrect item within the InlinePanel
. The ability
to add comments here has now been removed and as such any existing comments that were added will no longer show.
See https://github.com/wagtail/wagtail/issues/9685 for tracking of adding this back officially in the future.
classname
convention for some template tags & includesSome undocumented Wagtail admin template tags and includes have been refactored to adopt a more consistent naming of classname
.
If these are used within packages or customisations they will need to be updated to the new variable naming convention.
Name | New (classname ) |
Old (various) |
---|---|---|
dialog_toggle |
{% dialog_toggle classname='...' %} |
{% dialog_toggle class_name='...' %} |
paginate |
{% paginate pages classname="..." %} |
{% paginate pages classnames="..." %} |
tab_nav_link |
{% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with classname="..." %} |
{% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with classes="..." %} |
side_panel_button |
{% include 'wagtailadmin/shared/side_panels/includes/side_panel_button.html' with classname="..." %} |
{% include 'wagtailadmin/shared/side_panels/includes/side_panel_button.html' with classes="..." %} |
InlinePanel
JavaScript function is now a classThe (internal, undocumented) InlinePanel
JavaScript function, used to initialise client-side behaviour for inline panels, has been converted to a class. Any user code that calls this function should now replace InlinePanel(...)
calls with new InlinePanel(...)
. Additionally, child form controls are now initialised automatically, and so it is no longer necessary to call initChildControls
, updateChildCount
, updateMoveButtonDisabledStates
or updateAddButtonState
.
Python code that uses the InlinePanel
panel type is not affected by this change.
WAGTAILADMIN_GLOBAL_PAGE_EDIT_LOCK
setting is now WAGTAILADMIN_GLOBAL_EDIT_LOCK
The WAGTAILADMIN_GLOBAL_PAGE_EDIT_LOCK
setting has been renamed to WAGTAILADMIN_GLOBAL_EDIT_LOCK
.
The wagtailuserbar
template tag now initialises the userbar as a Web Component, with a wagtail-userbar
custom element using shadow DOM to apply styles without any collisions with the host page.
For any site customising the position of the userbar, target the styles to wagtail-userbar::part(userbar)
instead of .wagtail-userbar
. For example:
wagtail-userbar::part(userbar) {
bottom: 30px;
}
azure-mgmt-cdn
and azure-mgmt-frontdoor
packages will be droppedIf you are using the front-end cache invalidator module (wagtail.contrib.frontend_cache
) with Azure CDN or Azure Front Door, the following packages need to be updated:
azure-mgmt-cdn
to version 10 or aboveazure-mgmt-frontdoor
to version 1 or aboveSupport for older versions will be dropped in a future release.