NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #4986 most downloaded on PyPI
A Django content management system.
Latest stable
8.1
Last release 18 days ago
02 Nov 2026
Release timing varies
gaps range from 9 days to 2 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
13 years old
305 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
Fix: Un-pin django-treebeard following upstream fix for migration issue (Matt Westcott)
ClusterableModel on copy_for_translation (Karl Hobley)March 5, 2021
Un-pin django-treebeard following upstream fix for migration issue (Matt Westcott)
Prevent crash when copying an alias page (Karl Hobley)
Prevent errors on page editing after changing LANGUAGE_CODE (Matt Westcott)
Correctly handle model inheritance and ClusterableModel on copy_for_translation (Karl Hobley)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Pin django-treebeard to <4.5 to prevent migration conflicts (Matt Westcott)
February 18, 2021
Pin django-treebeard to <4.5 to prevent migration conflicts (Matt Westcott)
Fix: Ensure aliases are published when the source page is published (Karl Hobley)
manage.py dumpdata with no arguments (Matt Westcott)February 16, 2021
Ensure aliases are published when the source page is published (Karl Hobley)
Make page privacy rules apply to aliases (Karl Hobley)
Prevent error when saving embeds that do not include a thumbnail URL (Cynthia Kiser)
Ensure that duplicate embed records are deleted when upgrading (Matt Westcott)
Prevent failure when running manage.py dumpdata with no arguments (Matt Westcott)
Added a distinct 'choose' permission for images and documents (Robert Rollins)
WAGTAILIMAGES_IMAGE_FORM_BASE and WAGTAILDOCS_DOCUMENT_FORM_BASE settings to customise the forms for images and documents (Dan Braghis)register_page_action_menu_item and register_snippet_action_menu_item to skip registering an item (Vadim Karpenko)blank=False (Matt Westcott)Page.specific_deferred property for accessing specific page instance without up-front database queries (Andy Babic)February 2, 2021
Images and documents now support a distinct 'choose' permission type, to control the set of items displayed in the chooser interfaces when inserting images and documents into a page, and allow setting up collections that are only available for use by specific user groups. This feature was developed by Robert Rollins.
StreamField values now formally support being updated in-place from Python code, allowing blocks to be inserted, modified and deleted rather than having to assign a new list of blocks to the field. For further details, see modifying_streamfield_data. This feature was developed by Matt Westcott.
Wagtail’s admin now uses CSS custom properties for its primary teal colour. Applying brand colours for the whole user interface only takes a few lines of CSS, and third-party extensions can reuse Wagtail’s CSS variables to support the same degree of customization. Read on custom_user_interface_colors. This feature was developed by Joshua Marantz.
Added support for Python 3.9
Added WAGTAILIMAGES_IMAGE_FORM_BASE and WAGTAILDOCS_DOCUMENT_FORM_BASE settings to customize the forms for images and documents (Dan Braghis)
Switch pagination icons to use SVG instead of icon fonts (Scott Cranfill)
Added string representation to image Format class (Andreas Nüßlein)
Support returning None from register_page_action_menu_item and register_snippet_action_menu_item to skip registering an item (Vadim Karpenko)
Fields on a custom image model can now be defined as required / blank=False (Matt Westcott)
Add combined index for Postgres search backend (Will Giddens)
Add Page.specific_deferred property for accessing specific page instance without up-front database queries (Andy Babic)
Add hash lookup to embeds to support URLs longer than 255 characters (Coen van der Kamp)
Stop menu icon overlapping the breadcrumb on small viewport widths in page editor (Karran Besen)
Make sure document chooser pagination preserves the selected collection when moving between pages (Alex Sa)
Gracefully handle oEmbed endpoints returning non-JSON responses (Matt Westcott)
Fix unique constraint on WorkflowState for SQL Server compatibility (David Beitey)
Reinstate chevron on collection dropdown (Mike Brown)
Prevent delete button showing on collection / workflow edit views when delete permission is absent (Helder Correia)
Move labels above the form field in the image format chooser, to avoid styling issues at tablet size (Helen Chapman)
{% include_block with context %} now passes local variables into the block template (Jonny Scholes)
Elasticsearch version 2 is no longer supported as of this release; please upgrade to Elasticsearch 5 or above before upgrading Wagtail.
The stream_data property of StreamValue is commonly used to access the underlying data of a StreamField. However, this is discouraged, as it is an undocumented internal attribute and has different data representations depending on whether the value originated from the database or in memory, typically leading to errors on preview if this has not been properly accounted for. As such, stream_data is now deprecated.
The recommended alternative is to index the StreamField value directly as a list; for example, page.body[0].block_type and page.body[0].value instead of page.body.stream_data[0]['type'] and page.body.stream_data[0]['value']. This has the advantage that it will return the same Python objects as when the StreamField is used in template code (such as Page instances for PageChooserBlock). However, in most cases, existing code using stream_data is written to expect the raw JSON-like representation of the data, and for this the new property raw_data (added in Wagtail 2.12) can be used as a drop-in replacement for stream_data.
Added a distinct 'choose' permission for images and documents (Robert Rollins)
WAGTAILIMAGES_IMAGE_FORM_BASE and WAGTAILDOCS_DOCUMENT_FORM_BASE settings to customise the forms for images and documents (Dan Braghis)register_page_action_menu_item and register_snippet_action_menu_item to skip registering an item (Vadim Karpenko)blank=False (Matt Westcott)Page.specific_deferred property for accessing specific page instance without up-front database queries (Andy Babic)Fix: Update Pillow dependency to allow 9.x (Rizwan Mansuri)
January 24, 2022
Update Pillow dependency to allow 9.x (Rizwan Mansuri)
CVE-2021-32681 - fix improper escaping of HTML ('Cross-site Scripting') in Wagtail StreamField blocks (Karen Tracey, Matt Westcott)
CVE-2021-32681 - fix improper escaping of HTML ('Cross-site Scripting') in Wagtail StreamField blocks (Karen Tracey, Matt Westcott)
June 17, 2021
This release addresses a cross-site scripting (XSS) vulnerability in StreamField. When the {% include_block %} template tag is used to output the value of a plain-text StreamField block (CharBlock, TextBlock or a similar user-defined block derived from FieldBlock), and that block does not specify a template for rendering, the tag output is not properly escaped as HTML. This could allow users to insert arbitrary HTML or scripting. This vulnerability is only exploitable by users with the ability to author StreamField content (i.e. users with 'editor' access to the Wagtail admin).
Site implementers who wish to retain the existing behavior of allowing editors to insert HTML content in these blocks (and are willing to accept the risk of untrusted editors inserting arbitrary code) may disable the escaping by surrounding the relevant {% include_block %} tag in {% autoescape off %}...{% endautoescape %}.
Many thanks to Karen Tracey for reporting this issue. For further details, please see the CVE-2021-32681 security advisory.
CVE-2021-29434 - fix improper validation of URLs ('Cross-site Scripting') in rich text fields (Kevin Breen, Matt Westcott)
CVE-2021-29434 - fix improper validation of URLs ('Cross-site Scripting') in rich text fields (Kevin Breen, Matt Westcott)
April 19, 2021
This release addresses a cross-site scripting (XSS) vulnerability in rich text fields. When saving the contents of a rich text field in the admin interface, Wagtail did not apply server-side checks to ensure that link URLs use a valid protocol. A malicious user with access to the admin interface could thus craft a POST request to publish content with javascript: URLs containing arbitrary code. The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin.
Many thanks to Kevin Breen for reporting this issue.
Fix: Un-pin django-treebeard following upstream fix for migration issue (Matt Westcott)
ClusterableModel on copy_for_translation (Karl Hobley)March 5, 2021
Un-pin django-treebeard following upstream fix for migration issue (Matt Westcott)
Prevent crash when copying an alias page (Karl Hobley)
Prevent errors on page editing after changing LANGUAGE_CODE (Matt Westcott)
Correctly handle model inheritance and ClusterableModel on copy_for_translation (Karl Hobley)
Pin django-treebeard to <4.5 to prevent migration conflicts (Matt Westcott)
February 18, 2021
Pin django-treebeard to <4.5 to prevent migration conflicts (Matt Westcott)
Fix: Prevent delete button showing on collection / workflow edit views when delete permission is absent (Helder Correia)
February 16, 2021
Prevent delete button showing on collection / workflow edit views when delete permission is absent (Helder Correia)
Ensure aliases are published when the source page is published (Karl Hobley)
Make page privacy rules apply to aliases (Karl Hobley)
Fix: Updated project template migrations to ensure that initial homepage creation runs before addition of locale field (Dan Braghis)
LANGUAGES / WAGTAIL_CONTENT_LANGUAGES settings (Andreas Morgenstern)locale / translation_of API filters to be used in combination with search (Matt Westcott)create_log_entries_from_revisions when checking publish state on a revision that cannot be restored (Kristin Riebe)December 10, 2020
Updated project template migrations to ensure that initial homepage creation runs before addition of locale field (Dan Braghis)
Restore ability to use translatable strings in LANGUAGES / WAGTAIL_CONTENT_LANGUAGES settings (Andreas Morgenstern)
Allow locale / translation_of API filters to be used in combination with search (Matt Westcott)
Prevent error on create_log_entries_from_revisions when checking publish state on a revision that cannot be restored (Kristin Riebe)
The migration that creates the initial site homepage needs to be updated to ensure that will continue working under Wagtail 2.11. If you have kept the home app from the original project layout generated by the wagtail start command, this will be home/migrations/0002_create_homepage.py. Inside the Migration class, add the line run_before = [('wagtailcore', '0053_locale_model')] - for example:
# ...
class Migration(migrations.Migration):
run_before = [
('wagtailcore', '0053_locale_model'), # added for Wagtail 2.11 compatibility
]
dependencies = [
('home', '0001_initial'),
]
operations = [
migrations.RunPython(create_homepage, remove_homepage),
]
This fix applies to any migration that creates page instances programmatically. If you installed Wagtail into an existing Django project by following the instructions at ../getting_started/integrating_into_django, you most likely created the initial homepage manually, and no change is required in this case.
Further background: Wagtail 2.11 adds a locale field to the Page model, and since the existing migrations in your project pre-date this, they are designed to run against a version of the Page model that has no locale field. As a result, they need to run before the new migrations that have been added to wagtailcore within Wagtail 2.11. However, in the old version of the homepage migration, there is nothing to ensure that this sequence is followed. The actual order chosen is an internal implementation detail of Django, and in particular is liable to change as you continue developing your project under Wagtail 2.11 and create new migrations that depend on the current state of wagtailcore. In this situation, a user installing your project on a clean database may encounter the following error when running manage.py migrate:
django.db.utils.IntegrityError: NOT NULL constraint failed: wagtailcore_page.locale_id
Adding the run_before directive will ensure that the migrations run in the intended order, avoiding this error.
Add custom finder to support Instagram oEmbed API (Luis Nell)
Locale.get_active and .localized (Matt Westcott)get_supported_language_variant returning a language variant not in LANGUAGES (Matt Westcott)November 17, 2020
Two new embed finders have been added for Facebook and Instagram, to replace the previous configuration using Facebook's public oEmbed endpoint which was retired in October 2020. These require a Facebook developer API key - for details of configuring this, see facebook_and_instagram_embeds. This feature was developed by Cynthia Kiser and Luis Nell.
Improve performance of permission check on translations for edit page (Karl Hobley)
Gracefully handle missing Locale records on Locale.get_active and .localized (Matt Westcott)
Handle get_supported_language_variant returning a language variant not in LANGUAGES (Matt Westcott)
Reinstate missing icon on settings edit view (Jérôme Lebleu)
Avoid performance and pagination logic issues with a large number of languages (Karl Hobley)
Allow deleting the default locale (Matt Westcott)
Fix: Ensure that cached wagtail_site_root_paths structures from older Wagtail versions are invalidated (Sævar Öfjörð Magnússon)
wagtail_site_root_paths structures from older Wagtail versions are invalidated (Sævar Öfjörð Magnússon)WAGTAIL_CONTENT_LANGUAGES is active (Matt Westcott)November 6, 2020
Ensure that cached wagtail_site_root_paths structures from older Wagtail versions are invalidated (Sævar Öfjörð Magnússon)
Avoid circular import between wagtail.admin.auth and custom user models (Matt Westcott)
Prevent error on resolving page URLs when a locale outside of WAGTAIL_CONTENT_LANGUAGES is active (Matt Westcott)
Add support for multi-lingual content (Karl Hobley)
fix_tree method with the ability to non-destructively fix path issues and add a --full option to apply path fixes (Matt Westcott)before_edit_snippet, before_create_snippet and before_delete_snippet hooks and documentation (Karl Hobley. Sponsored by the Mozilla Foundation)register_snippet_listing_buttons and construct_snippet_listing_buttons hooks and documentation (Karl Hobley. Sponsored by the Mozilla Foundation)wagtail --version to available Wagtail CLI commands (Kalob Taulien)hooks.register_temporarily utility function for testing hooks (Karl Hobley. Sponsored by the Mozilla Foundation)unidecode and use anyascii in for Unicode to ASCII conversion (Robbie Mackay)render helper to RoutablePageMixin to support serving template responses according to Wagtail conventions (Andy Babic)content-type and content-disposition configurable via WAGTAILDOCS_CONTENT_TYPES and WAGTAILDOCS_INLINE_CONTENT_TYPES (Matt Westcott)BASE_URL setting is now converted to a string, if it isn't already, when constructing API URLs (thenewguy)WAGTAIL_DOCS_EXTENSIONS is set (Meghana Bhange)django-admin command in place of django-admin.py (minusf)register_snippet_action_menu_item and construct_snippet_action_menu hooks to modify the actions available when creating / editing a snippet (Karl Hobley)generate_signature and verify_signature functions into wagtail.images.utils (Noah H)bulk_to_python on all structural StreamField block types (Matt Westcott)GroupCollectionPermission (Jim Jazwiecki)prepopulated_fields for wagtail.contrib.modeladmin (David Bramwell)classname keyword argument on basic StreamField blocks to form_classname (Meghana Bhange)WAGTAILFRONTENDCACHE_LANGUAGES was being interpreted incorrectly. It now accepts a list of strings, as documented (Karl Hobley)edit_handler bind order in ModelAdmin views and fix duplicate form instance creation (Jérôme Lebleu)get_admin_display_title methods (Saptak Sengupta)Page.copy() now raises an error if the page being copied is unsaved (Anton Zhyltsou)Page.copy() now triggers a page_published if the copied page is live (Anton Zhyltsou)URLS setting can now take a string on its own instead of a list (Sævar Öfjörð Magnússon)November 2, 2020
Wagtail 2.11 is designated a Long Term Support (LTS) release. Long Term Support releases will continue to receive maintenance updates as necessary to address security and data-loss related issues, up until the next LTS release (typically a period of 12 months).
With this release, Wagtail now has official support for authoring content for multiple languages/regions.
To find out more about this feature, see multi_language_content.
We have also developed a new plugin for translating content between different locales called wagtail-localize. You can find details about wagtail-localize on its GitHub page.
This feature was sponsored by The Mozilla Foundation and Torchbox.
This release introduces support for creating page aliases.
Page aliases are exact copies of another page that sit in another part of the tree. They remain in sync with the original page until this link is removed by converting them into a regular page, or deleting the original page.
A page alias can be created through the "Copy Page" UI by selecting the "Alias" checkbox when creating a page copy.
This feature was sponsored by The Mozilla Foundation.
Collections (for organising images, documents or other media) can now be managed as a hierarchy rather than a flat list. This feature was developed by Robert Rollins.
Add before_edit_snippet, before_create_snippet and before_delete_snippet hooks and documentation (Karl Hobley. Sponsored by the Mozilla Foundation)
Add register_snippet_listing_buttons and construct_snippet_listing_buttons hooks and documentation (Karl Hobley. Sponsored by the Mozilla Foundation)
Add wagtail --version to available Wagtail CLI commands (Kalob Taulien)
Add hooks.register_temporarily utility function for testing hooks (Karl Hobley. Sponsored by the Mozilla Foundation)
Remove unidecode and use anyascii in for Unicode to ASCII conversion (Robbie Mackay)
Add render helper to RoutablePageMixin to support serving template responses according to Wagtail conventions (Andy Babic)
Specify minimum Python version in setup.py (Vince Salvino)
Extend treebeard's fix_tree method with the ability to non-destructively fix path issues and add a --full option to apply path fixes (Matt Westcott)
Add support for hierarchical/nested Collections (Robert Rollins)
Show user's full name in report views (Matt Westcott)
Improve Wagtail admin page load performance by caching SVG icons sprite in localStorage (Coen van der Kamp)
Support SVG icons in ModelAdmin menu items (Scott Cranfill)
Support SVG icons in admin breadcrumbs (Coen van der Kamp)
Serve PDFs inline in the browser (Matt Westcott)
Make document content-type and content-disposition configurable via WAGTAILDOCS_CONTENT_TYPES and WAGTAILDOCS_INLINE_CONTENT_TYPES (Matt Westcott)
Slug generation no longer removes stopwords (Andy Chosak, Scott Cranfill)
Add check to disallow StreamField block names that do not match Python variable syntax (François Poulain)
The BASE_URL setting is now converted to a string, if it isn't already, when constructing API URLs (thenewguy)
Preview from 'pages awaiting moderation' now opens in a new window (Cynthia Kiser)
Add document extension validation if WAGTAIL_DOCS_EXTENSIONS is set to a list of allowed extensions (Meghana Bhange)
Use django-admin command in place of django-admin.py (minusf)
Add register_snippet_action_menu_item and construct_snippet_action_menu hooks to modify the actions available when creating / editing a snippet (Karl Hobley)
Moved generate_signature and verify_signature functions into wagtail.images.utils (Noah H)
Implement bulk_to_python on all structural StreamField block types (Matt Westcott)
Add natural key support to GroupCollectionPermission (Jim Jazwiecki)
Implement prepopulated_fields for wagtail.contrib.modeladmin (David Bramwell)
Change classname keyword argument on basic StreamField blocks to form_classname (Meghana Bhange)
Replace page explorer pushPage/popPage with gotoPage for more flexible explorer navigation (Karl Hobley)
Make page-level actions accessible to keyboard users in page listing tables (Jesse Menn)
WAGTAILFRONTENDCACHE_LANGUAGES was being interpreted incorrectly. It now accepts a list of strings, as documented (Karl Hobley)
Update oEmbed endpoints to use https where available (Matt Westcott)
Revise edit_handler bind order in ModelAdmin views and fix duplicate form instance creation (Jérôme Lebleu)
Properly distinguish child blocks when comparing revisions with nested StreamBlocks (Martin Mena)
Correctly handle Turkish 'İ' characters in client-side slug generation (Matt Westcott)
Page chooser widgets now reflect custom get_admin_display_title methods (Saptak Sengupta)
Page.copy() now raises an error if the page being copied is unsaved (Anton Zhyltsou)
Page.copy() now triggers a page_published if the copied page is live (Anton Zhyltsou)
The Elasticsearch URLS setting can now take a string on its own instead of a list (Sævar Öfjörð Magnússon)
Avoid retranslating month / weekday names that Django already provides (Matt Westcott)
Fixed padding around checkbox and radio inputs (Cole Maclean)
Fix spacing around the privacy indicator panel (Sævar Öfjörð Magnússon, Dan Braghis)
Consistently redirect to admin home on permission denied (Matt Westcott, Anton Zhyltsou)
The migration that creates the initial site homepage needs to be updated to ensure that will continue working under Wagtail 2.11. If you have kept the home app from the original project layout generated by the wagtail start command, this will be home/migrations/0002_create_homepage.py. Inside the Migration class, add the line run_before = [('wagtailcore', '0053_locale_model')] - for example:
# ...
class Migration(migrations.Migration):
run_before = [
('wagtailcore', '0053_locale_model'), # added for Wagtail 2.11 compatibility
]
dependencies = [
('home', '0001_initial'),
]
operations = [
migrations.RunPython(create_homepage, remove_homepage),
]
This fix applies to any migration that creates page instances programmatically. If you installed Wagtail into an existing Django project by following the instructions at ../getting_started/integrating_into_django, you most likely created the initial homepage manually, and no change is required in this case.
Further background: Wagtail 2.11 adds a locale field to the Page model, and since the existing migrations in your project pre-date this, they are designed to run against a version of the Page model that has no locale field. As a result, they need to run before the new migrations that have been added to wagtailcore within Wagtail 2.11. However, in the old version of the homepage migration, there is nothing to ensure that this sequence is followed. The actual order chosen is an internal implementation detail of Django, and in particular is liable to change as you continue developing your project under Wagtail 2.11 and create new migrations that depend on the current state of wagtailcore. In this situation, a user installing your project on a clean database may encounter the following error when running manage.py migrate:
django.db.utils.IntegrityError: NOT NULL constraint failed: wagtailcore_page.locale_id
Adding the run_before directive will ensure that the migrations run in the intended order, avoiding this error.
This release begins the process of phasing out support for Internet Explorer.
The SiteMiddleware class (which provides the request.site property, and has been deprecated since Wagtail 2.9) has been moved to the wagtail.contrib.legacy namespace. On projects where this is still in use, the 'wagtail.core.middleware.SiteMiddleware' entry in MIDDLEWARE should be changed to 'wagtail.contrib.legacy.sitemiddleware.SiteMiddleware'.
As part of the hierarchical collections support, the path field on the Collection model now enforces alphabetical ordering. Previously, collections were stored in the order in which they were created - and then sorted by name where displayed in the CMS. This change will be handled automatically through migrations when upgrading to Wagtail 2.11.
However, if your project creates new collections programmatically after migrations have run, and assigns the path field directly - for example, by loading from a fixture file - this code will need to be updated to insert them in alphabetical order. Otherwise, errors may occur when subsequently adding new collections through the Wagtail admin. This can be done as follows:
Update paths to match alphabetical order. For example, if you have a fixture that creates the collections Zebras and Aardvarks with paths 00010001 and 00010002 respectively, these paths should be swapped.
Alternatively, after creating the collections, run the Python code:
from wagtail.core.models import Collection
Collection.fix_tree(fix_paths=True)
or the management command:
python manage.py fixtree --full
In previous releases, Site.get_site_root_paths returned a list of (site_id, root_path, root_url) tuples. To support the new internationalisation model, this has now been changed to a list of named tuples with the fields: site_id, root_path, root_url and language_code. Existing code that handled this as a 3-tuple should be updated accordingly.
Basic StreamField block types such as CharBlock previously accepted a classname keyword argument, to specify a class attribute to appear on the page editing form. For consistency with StructBlock, this has now been changed to form_classname. The classname argument is still recognised, but deprecated.
Add support for multi-lingual content (Karl Hobley)
fix_tree method with the ability to non-destructively fix path issues and add a --full option to apply path fixes (Matt Westcott)before_edit_snippet, before_create_snippet and before_delete_snippet hooks and documentation (Karl Hobley. Sponsored by the Mozilla Foundation)register_snippet_listing_buttons and construct_snippet_listing_buttons hooks and documentation (Karl Hobley. Sponsored by the Mozilla Foundation)wagtail --version to available Wagtail CLI commands (Kalob Taulien)hooks.register_temporarily utility function for testing hooks (Karl Hobley. Sponsored by the Mozilla Foundation)unidecode and use anyascii in for Unicode to ASCII conversion (Robbie Mackay)render helper to RoutablePageMixin to support serving template responses according to Wagtail conventions (Andy Babic)content-type and content-disposition configurable via WAGTAILDOCS_CONTENT_TYPES and WAGTAILDOCS_INLINE_CONTENT_TYPES (Matt Westcott)BASE_URL setting is now converted to a string, if it isn't already, when constructing API URLs (thenewguy)WAGTAIL_DOCS_EXTENSIONS is set (Meghana Bhange)django-admin command in place of django-admin.py (minusf)register_snippet_action_menu_item and construct_snippet_action_menu hooks to modify the actions available when creating / editing a snippet (Karl Hobley)generate_signature and verify_signature functions into wagtail.images.utils (Noah H)bulk_to_python on all structural StreamField block types (Matt Westcott)GroupCollectionPermission (Jim Jazwiecki)prepopulated_fields for wagtail.contrib.modeladmin (David Bramwell)classname keyword argument on basic StreamField blocks to form_classname (Meghana Bhange)WAGTAILFRONTENDCACHE_LANGUAGES was being interpreted incorrectly. It now accepts a list of strings, as documented (Karl Hobley)edit_handler bind order in ModelAdmin views and fix duplicate form instance creation (Jérôme Lebleu)get_admin_display_title methods (Saptak Sengupta)Page.copy() now raises an error if the page being copied is unsaved (Anton Zhyltsou)Page.copy() now triggers a page_published if the copied page is live (Anton Zhyltsou)URLS setting can now take a string on its own instead of a list (Sævar Öfjörð Magnússon)Fix: Avoid use of icon class name on userbar icon to prevent clashes with front-end styles (Karran Besen)
icon class name on userbar icon to prevent clashes with front-end styles (Karran Besen)create_log_entries_from_revisions now handles revisions that cannot be restored due to foreign key constraints (Matt Westcott)September 25, 2020
Avoid use of icon class name on userbar icon to prevent clashes with front-end styles (Karran Besen)
Prevent focused button labels from displaying as white on white (Karran Bessen)
Avoid showing preview button on moderation dashboard for page types with preview disabled (Dino Perovic)
Prevent oversized buttons in moderation dashboard panel (Dan Braghis)
create_log_entries_from_revisions now handles revisions that cannot be restored due to foreign key constraints (Matt Westcott)
Fix: Prevent create_log_entries_from_revisions command from failing when page model classes are missing (Dan Braghis)
create_log_entries_from_revisions command from failing when page model classes are missing (Dan Braghis)username field (Vyacheslav Matyukhin)USE_TZ is false (Matt Westcott)August 26, 2020
Prevent create_log_entries_from_revisions command from failing when page model classes are missing (Dan Braghis)
Prevent page audit log views from failing for user models without a username field (Vyacheslav Matyukhin)
Fix icon alignment on menu items (Coen van der Kamp)
Page editor header bar now correctly shows 'Published' or 'Draft' status when no revisions exist (Matt Westcott)
Prevent page editor from failing when USE_TZ is false (Matt Westcott)
Ensure whitespace between block-level elements is preserved when stripping tags from rich text for search indexing (Matt Westcott)
Deprecate use of unidecode within form builder field names (Michael van Tellingen, LB (Ben Johnston))
webpquality and format-webp-lossless image filters and WAGTAILIMAGES_WEBP_QUALITY setting (Nikolay Lukyanov)next_url keyword argument on register_page_listing_buttons and register_page_listing_more_buttons hooks (Ascani Carlo, Matt Westcott, LB (Ben Johnston))AbstractEmailForm will use SHORT_DATETIME_FORMAT and SHORT_DATE_FORMAT Django settings to format date/time values in email (Haydn Greatnews)AbstractEmailForm now has a separate method (render_email) to build up email content on submission emails (Haydn Greatnews)pre_page_move and post_page_move signals (Andy Babic)after_publish_page, before_publish_page, after_unpublish_page & before_unpublish_page hooks (Jonatas Baldin, Coen van der Kamp)page_url shortcut to improve how page URLs can be accessed from site settings in Django templates (Andy Babic)Site object, so that index page and Site switcher will be sorted consistently (Coen van der Kamp, Tim Leguijt)branding_logo block (Meteor0id)alt property to ImageRenditionField api representation (Liam Mullens)purge_revisions management command to purge old page revisions (Jacob Topp-Mugglestone, Tom Dyson)Page views (Caitlin White, Coen van der Kamp)form_classname on ListBlock & StreamBlock (LB (Ben Johnston))Rustface for image feature detection (Neal Todd)PageQuerySet (Timothy Bautista)add_redirect static method to Redirect class for programmatic redirect creation (Brylie Christopher Oxley, Lacey Williams Henschel)wagtail.contrib.redirects (LB (Ben Johnston))bulk_delete page permission is no longer required to move pages, even if those pages have children (Robert Rollins, LB (Ben Johnston))after_edit_snippet, after_create_snippet and after_delete_snippet hooks and documentation (Kalob Taulien)gulp-sass with gulp-dart-sass to improve core development across different platforms (Thibaud Colas)wagtail.contrib.legacy.richtext (Coen van der Kamp, Dan Braghis)WAGTAIL_TIME_FORMAT setting (Jacob Topp-Mugglestone)WAGTAILADMIN_RICH_TEXT_EDITORS (Gassan Gousseinov)EditHandler without a children attribute (Seb Brown)Page.objects.specific now gracefully handles pages with missing specific records (Andy Babic)AbstractEmailForm saved submission fields are now aligned with the email content fields, form.cleaned_data will be used instead of form.fields (Haydn Greatnews)role="table" from TableBlock output (Thibaud Colas)FieldRowPanel is used inside a MultiFieldPanel (Jérôme Lebleu).annotate_score()) when using specific models in page query (Dan Bentley)RichTextField & RichTextBlock search index content (Timothy Bautista)Site.site_name blank values to avoid different values for no name (Coen van der Kamp)wagtail.contrib.sitemaps no longer depends on SiteMiddleware (Matt Westcott)unique_together constraints (Matt Westcott)August 11, 2020
This release introduces a configurable moderation workflow system to replace the single-step "submit for moderation" feature. Workflows can be set up on specific subsections of the page tree and consist of any number of tasks to be completed by designated user groups. To support this, numerous UI improvements have been made to Wagtail's page editor, including a new log viewer to track page history.
For further details, see our How-to: Configure workflows for moderation and ../extending/custom_tasks.
This feature was developed by Jacob Topp-Mugglestone, Karl Hobley, Matt Westcott and Dan Braghis, and sponsored by The Motley Fool.
This release adds support for Django 3.1. Compatibility fixes were contributed by Matt Westcott and Karl Hobley.
Search queries can now be constructed as structured expressions in the manner of the Django ORM's Q() values, allowing for complex queries that combine individual terms, phrases and boosting. A helper function parse_query_string is provided to convert "natural" queries containing quoted phrases into these expressions. For complete documentation, see wagtailsearch_complex_queries. This feature was developed by Karl Hobley and sponsored by The Motley Fool.
Redirects can now be imported from an uploaded CSV, TSV, XLS or XLSX file. This feature was developed by Martin Sandström.
This release contains a number of improvements to the accessibility and general usability of the Wagtail admin, fixing long-standing issues. Some of the changes come from our January 2020 sprint in Bristol, and some from our brand new accessibility team:
Remove sticky footer on small devices, so that content is not blocked and more easily editable (Saeed Tahmasebi)
Add SVG icons to resolve accessibility and customization issues and start using them in a subset of Wagtail's admin (Coen van der Kamp, Scott Cranfill, Thibaud Colas, Dan Braghis)
Switch userbar and header H1s to use SVG icons (Coen van der Kamp)
Add skip link for keyboard users to bypass Wagtail navigation in the admin (Martin Coote)
Add missing dropdown icons to image upload, document upload, and site settings screens (Andreas Bernacca)
Prevent snippets’ bulk delete button from being present for screen reader users when it’s absent for sighted users (LB (Ben Johnston))
Added webpquality and format-webp-lossless image filters and WAGTAILIMAGES_WEBP_QUALITY setting. See output_image_format and image_quality (Nikolay Lukyanov)
Reorganised Dockerfile in project template to follow best practices (Tomasz Knapik, Jannik Wempe)
Added filtering to locked pages report (Karl Hobley)
Adds ability to view a group's users via standalone admin URL and a link to this on the group edit view (Karran Besen)
Redirect to previous url when deleting/copying/unpublish a page and modify this url via the relevant hooks (Ascani Carlo)
Added next_url keyword argument on register_page_listing_buttons and register_page_listing_more_buttons hooks (Ascani Carlo, Matt Westcott, LB (Ben Johnston))
AbstractEmailForm will use SHORT_DATETIME_FORMAT and SHORT_DATE_FORMAT Django settings to format date/time values in email (Haydn Greatnews)
AbstractEmailForm now has a separate method (render_email) to build up email content on submission emails. See form_builder_render_email. (Haydn Greatnews)
Add pre_page_move and post_page_move signals. (Andy Babic)
Add ability to sort search promotions on listing page (Chris Ranjana, LB (Ben Johnston))
Upgrade internal JS tooling; Node v10, Gulp v4 & Jest v23 (Jim Jazwiecki, Kim LaRocca, Thibaud Colas)
Add after_publish_page, before_publish_page, after_unpublish_page & before_unpublish_page hooks (Jonatas Baldin, Coen van der Kamp)
Add convenience page_url shortcut to improve how page URLs can be accessed from site settings in Django templates (Andy Babic)
Show more granular error messages from Pillow when uploading images (Rick van Hattem)
Add ordering to Site object, so that index page and Site switcher will be sorted consistently (Coen van der Kamp, Tim Leguijt)
Add Reddit to oEmbed provider list (Luke Hardwick)
Add ability to replace the default Wagtail logo in the userbar, via branding_logo block (Meteor0id)
Add alt property to ImageRenditionField api representation (Liam Mullens)
Add purge_revisions management command to purge old page revisions (Jacob Topp-Mugglestone, Tom Dyson)
Render the Wagtail User Bar on non Page views (Caitlin White, Coen van der Kamp)
Add ability to define form_classname on ListBlock & StreamBlock (LB (Ben Johnston))
Add documentation about how to use Rustface for image feature detection (Neal Todd)
Improve performance of public/not_public queries in PageQuerySet (Timothy Bautista)
Add add_redirect static method to Redirect class for programmatic redirect creation (Brylie Christopher Oxley, Lacey Williams Henschel)
Add reference documentation for wagtail.contrib.redirects See redirects. (LB (Ben Johnston))
bulk_delete page permission is no longer required to move pages, even if those pages have children (Robert Rollins, LB (Ben Johnston))
Add after_edit_snippet, after_create_snippet and after_delete_snippet hooks and documentation (Kalob Taulien)
Improve performance of empty search results by avoiding downloading the entire search index in these scenarios (Lars van de Kerkhof, Coen van der Kamp)
Replace gulp-sass with gulp-dart-sass to improve core development across different platforms (Thibaud Colas)
Remove markup around rich text rendering by default, provide a way to use old behavior via wagtail.contrib.legacy.richtext. See /reference/contrib/legacy_richtext. (Coen van der Kamp, Dan Braghis)
Add WAGTAIL_TIME_FORMAT setting (Jacob Topp-Mugglestone)
Apply title length normalisation to improve ranking on PostgreSQL search (Karl Hobley)
Allow omitting the default editor from WAGTAILADMIN_RICH_TEXT_EDITORS (Gassan Gousseinov)
Disable password auto-completion on user creation form (Samir Shah)
Upgrade jQuery to version 3.5.1 to reduce penetration testing false positives (Matt Westcott)
Add ability to extend EditHandler without a children attribute (Seb Brown)
Page.objects.specific now gracefully handles pages with missing specific records (Andy Babic)
StreamField 'add' buttons are now disabled when maximum count is reached (Max Gabrielsson)
Use underscores for form builder field names to allow use as template variables (Ashia Zawaduk, LB (Ben Johnston))
Deprecate use of unidecode within form builder field names (Michael van Tellingen, LB (Ben Johnston))
Improve error feedback when editing a page with a missing model class (Andy Babic)
Change Wagtail tabs implementation to only allow slug-formatted tab identifiers, reducing false positives from security audits (Matt Westcott)
Ensure errors during Postgres search indexing are left uncaught to assist troubleshooting (Karl Hobley)
Add ability to edit images and embeds in rich text editor (Maylon Pedroso, Samuel Mendes, Gabriel Peracio)
Ensure link to add a new user works when no users are visible in the users list (LB (Ben Johnston))
AbstractEmailForm saved submission fields are now aligned with the email content fields, form.cleaned_data will be used instead of form.fields (Haydn Greatnews)
Removed ARIA role="table" from TableBlock output (Thibaud Colas)
Set Cache-Control header to prevent page preview responses from being cached (Tomas Walch)
Accept unicode characters in slugs on the "copy page" form (François Poulain)
Support IPv6 domain (Alex Gleason, Coen van der Kamp)
Remove top padding when FieldRowPanel is used inside a MultiFieldPanel (Jérôme Lebleu)
Add Wagtail User Bar back to page previews and ensure moderation actions are available (Coen van der Kamp)
Fix issue where queryset annotations were lost (e.g. .annotate_score()) when using specific models in page query (Dan Bentley)
Prevent date/time picker from losing an hour on losing focus when 12-hour times are in use (Jacob Topp-Mugglestone)
Strip out HTML tags from RichTextField & RichTextBlock search index content (Timothy Bautista)
Avoid using null on string Site.site_name blank values to avoid different values for no name (Coen van der Kamp)
Fix deprecation warnings on Elasticsearch 7 (Yngve Høiseth)
Remove use of Node.forEach for IE 11 compatibility in admin menu items (Thibaud Colas)
Fix incorrect method name in SiteMiddleware deprecation warning (LB (Ben Johnston))
wagtail.contrib.sitemaps no longer depends on SiteMiddleware (Matt Westcott)
Purge image renditions cache when renditions are deleted (Pascal Widdershoven, Matt Westcott)
Image / document forms now display non-field errors such as unique_together constraints (Matt Westcott)
Make "Site" chooser in site settings translatable (Andreas Bernacca)
Fix group permission checkboxes not being clickable in IE11 (LB (Ben Johnston))
Python 3.5 is no longer supported as of this release; please upgrade to Python 3.6 or above before upgrading Wagtail.
A new workflow system has been introduced for moderation. Task types are defined as models in code, and instances - tasks - are created in the Wagtail Admin, then chained together to form workflows: sequences of moderation stages through which a page must pass prior to publication.
Key points:
Prior to 2.10, moderation in Wagtail was performed on a per-revision basis: once submitted, the moderator would approve or reject the submitted revision only, which would not include subsequent changes. Moderation is now performed per page, with moderators always seeing the latest revision.
PageRevision.submitted_for_moderation will return True for revisions passing through the old moderation system, but not for the new system
Pages undergoing moderation in the old system will not have their moderation halted, and can still be approved/rejected. As a result, you may see two sets of moderation dashboard panels until there are no longer any pages in moderation in the old system
No pages can be submitted for moderation in the old system: "Submit for moderation" now submits to the new Workflow system
You no longer need the publish permission to perform moderation actions on a page - actions available to each user are now configured per task. With the built in GroupApprovalTask, anybody in a specific set of groups can approve or reject the task.
A data migration is provided to recreate your existing publish-permission based moderation workflow in the new system. If you have made no permissions changes, this should simply create a task approvable by anybody in the Moderators group, and assign a workflow with this task to the root page, creating a standard workflow for the entire page tree. However, if you have a complex nested set of publish page permissions, the created set of workflows will be more complex as well - you may wish to inspect the created workflows and tasks in the new Settings/Workflows admin area and potentially simplify them. See our How-to: Configure workflows for moderation for the administrator guide.
In previous releases, rich text values were enclosed in a <div class="rich-text"> element when rendered; this element has now been removed. To restore the old behaviour, see /reference/contrib/legacy_richtext.
This release introduces logging of user actions, viewable through the "Site history" report. To pre-populate these logs with data from page revision history, run the management command: ./manage.py create_log_entries_from_revisions.
A clean_name field has been added to form field models that extend AbstractForm. This is used as the name attribute of the HTML form field, and the dictionary key that the submitted form data is stored under. Storing this on the model (rather than calculating it on-the-fly as was done previously) ensures that if the algorithm for generating the clean name changes in future, the existing data will not become inaccessible. A future version of Wagtail will drop the unidecode library currently used for this.
For forms created through the Wagtail admin interface, no action is required, as the new field will be populated on server startup. However, any process that creates form pages through direct insertion on the database (such as loading from fixtures) should now be updated to populate clean_name.
Functions registered through the hooks register_page_listing_buttons and register_page_listing_more_buttons now accept an additional keyword argument next_url. A hook function currently written as:
@hooks.register('register_page_listing_buttons')
def page_listing_more_buttons(page, page_perms, is_parent=False):
yield wagtailadmin_widgets.Button(
'My button', '/goes/to/a/url/', priority=60
)
should now become:
@hooks.register('register_page_listing_buttons')
def page_listing_more_buttons(page, page_perms, is_parent=False, next_url=None):
yield wagtailadmin_widgets.Button(
'My button', '/goes/to/a/url/', priority=60
)
The next_url argument specifies a URL to redirect back to after the action is complete, and can be passed as a query parameter to the linked URL, if the view supports it.
Add missing SVG icons for optional rich text features (Dan Braghis)
Fixes from 2.10rc1:
has_changed detection on StreamField, to allow non-linear workflows to continue working (Jacob Topp-Mugglestone)SubmissionsListView into models.py files for use in form builder (Matt Westcott)Deprecate use of unidecode within form builder field names (Michael van Tellingen, LB (Ben Johnston))
webpquality and format-webp-lossless image filters and WAGTAILIMAGES_WEBP_QUALITY setting (Nikolay Lukyanov)next_url keyword argument on register_page_listing_buttons and register_page_listing_more_buttons hooks (Ascani Carlo, Matt Westcott, LB (Ben Johnston))AbstractEmailForm will use SHORT_DATETIME_FORMAT and SHORT_DATE_FORMAT Django settings to format date/time values in email (Haydn Greatnews)AbstractEmailForm now has a separate method (render_email) to build up email content on submission emails (Haydn Greatnews)pre_page_move and post_page_move signals (Andy Babic)after_publish_page, before_publish_page, after_unpublish_page & before_unpublish_page hooks (Jonatas Baldin, Coen van der Kamp)page_url shortcut to improve how page URLs can be accessed from site settings in Django templates (Andy Babic)Site object, so that index page and Site switcher will be sorted consistently (Coen van der Kamp, Tim Leguijt)branding_logo block (Meteor0id)alt property to ImageRenditionField api representation (Liam Mullens)purge_revisions management command to purge old page revisions (Jacob Topp-Mugglestone, Tom Dyson)Page views (Caitlin White, Coen van der Kamp)form_classname on ListBlock & StreamBlock (LB (Ben Johnston))Rustface for image feature detection (Neal Todd)PageQuerySet (Timothy Bautista)add_redirect static method to Redirect class for programmatic redirect creation (Brylie Christopher Oxley, Lacey Williams Henschel)wagtail.contrib.redirects (LB (Ben Johnston))bulk_delete page permission is no longer required to move pages, even if those pages have children (Robert Rollins, LB (Ben Johnston))after_edit_snippet, after_create_snippet and after_delete_snippet hooks and documentation (Kalob Taulien)gulp-sass with gulp-dart-sass to improve core development across different platforms (Thibaud Colas)wagtail.contrib.legacy.richtext (Coen van der Kamp, Dan Braghis)WAGTAIL_TIME_FORMAT setting (Jacob Topp-Mugglestone)WAGTAILADMIN_RICH_TEXT_EDITORS (Gassan Gousseinov)EditHandler without a children attribute (Seb Brown)Page.objects.specific now gracefully handles pages with missing specific records (Andy Babic)AbstractEmailForm saved submission fields are now aligned with the email content fields, form.cleaned_data will be used instead of form.fields (Haydn Greatnews)role="table" from TableBlock output (Thibaud Colas)FieldRowPanel is used inside a MultiFieldPanel (Jérôme Lebleu).annotate_score()) when using specific models in page query (Dan Bentley)RichTextField & RichTextBlock search index content (Timothy Bautista)Site.site_name blank values to avoid different values for no name (Coen van der Kamp)wagtail.contrib.sitemaps no longer depends on SiteMiddleware (Matt Westcott)unique_together constraints (Matt Westcott)CVE-2020-15118 - prevent HTML injection through form field help text (Timothy Bautista, Matt Westcott)
CVE-2020-15118 - prevent HTML injection through form field help text (Timothy Bautista, Matt Westcott)
July 20, 2020
This release addresses an HTML injection vulnerability through help text in the wagtail.contrib.forms form builder app. When a form page type is made available to Wagtail editors, and the page template is built using Django's standard form rendering helpers such as form.as_p (as directed in the documentation), any HTML tags used within a form field's help text will be rendered unescaped in the page. Allowing HTML within help text is an intentional design decision by Django (see the docs for ~django.db.models.Field.help_text); however, as a matter of policy Wagtail does not allow editors to insert arbitrary HTML by default, as this could potentially be used to carry out cross-site scripting attacks, including privilege escalation. This functionality should therefore not have been made available to editor-level users.
The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin.
Site owners who wish to re-enable the use of HTML within help text (and are willing to accept the risk of this being exploited by editors) may set WAGTAILFORMS_HELP_TEXT_ALLOW_HTML = True in their configuration settings.
Many thanks to Timothy Bautista for reporting this issue.
Fix: Prevent startup failure when wagtail.contrib.sitemaps is in INSTALLED_APPS (Matt Westcott)
wagtail.contrib.sitemaps is in INSTALLED_APPS (Matt Westcott)July 3, 2020
Prevent startup failure when wagtail.contrib.sitemaps is in INSTALLED_APPS (Matt Westcott)
Fix: Fix incorrect method name in SiteMiddleware deprecation warning (LB (Ben Johnston))
wagtail.contrib.sitemaps no longer depends on SiteMiddleware (Matt Westcott)June 30, 2020
Fix incorrect method name in SiteMiddleware deprecation warning (LB (Ben Johnston))
wagtail.contrib.sitemaps no longer depends on SiteMiddleware (Matt Westcott)
Purge image renditions cache when renditions are deleted (Pascal Widdershoven, Matt Westcott)
Fix: CVE-2020-11037 - avoid potential timing attack on password-protected private pages (Thibaud Colas)
MultipleChoiceBlock block type for StreamField (James O'Toole)widget keyword argument (James O'Toole)WAGTAIL_ALLOW_UNICODE_SLUGS (Arkadiusz Michał Ryś)wagtail_serve URL route can now be omitted for headless sites (Storm Heg)preview_modes to an empty list (Casper Timmers)ugettext / ungettext calls with gettext / ngettext (Mohamed Feddad)bulk_to_python if defined (Andy Chosak)select_related attribute to site settings to enable more efficient fetching of foreign key values (Andy Babic)blank=False (Matt Westcott){% image ... as var %} now clears the context variable when passed None as an image (Maylon Pedroso)refresh_index method on Elasticsearch no longer fails (Lars van de Kerkhof)scope attribute to table headers in TableBlock output (Quadric).delete() method on the default Page.objects manager (Nick Smith)exclude_fields_in_copy on Page models will now work for for modelcluster parental / many to many relations (LB (Ben Johnston))main, header and footer elements in the admin page layout (Mitchel Cabuloy)May 4, 2020
Data from reports, form submissions and ModelAdmin can now be exported to both XLSX and CSV format. For ModelAdmin, this is enabled by specifying a list_export attribute on the ModelAdmin class. This feature was developed by Jacob Topp-Mugglestone and sponsored by The Motley Fool.
This release addresses a potential timing attack on pages or documents that have been protected with a shared password through Wagtail's "Privacy" controls. This password check is performed through a character-by-character string comparison, and so an attacker who is able to measure the time taken by this check to a high degree of accuracy could potentially use timing differences to gain knowledge of the password. (This is understood to be feasible on a local network, but not on the public internet.)
Many thanks to Thibaud Colas for reporting this issue.
Added support for creating custom reports (Jacob Topp-Mugglestone)
Skip page validation when unpublishing a page (Samir Shah)
Added MultipleChoiceBlock block type for StreamField (James O'Toole)
ChoiceBlock now accepts a widget keyword argument (James O'Toole)
Reduced contrast of rich text toolbar (Jack Paine)
Support the rel attribute on custom ModelAdmin buttons (Andy Chosak)
Server-side page slug generation now respects WAGTAIL_ALLOW_UNICODE_SLUGS (Arkadiusz Michał Ryś)
Wagtail admin no longer depends on SiteMiddleware, avoiding incompatibility with Django sites framework and redundant database queries (aritas1, timmysmalls, Matt Westcott)
Tag field autocompletion now handles custom tag models (Matt Westcott)
wagtail_serve URL route can now be omitted for headless sites (Storm Heg)
Allow free tagging to be disabled on custom tag models (Matt Westcott)
Allow disabling page preview by setting preview_modes to an empty list (Casper Timmers)
Add Vidyard to oEmbed provider list (Steve Lyall)
Optimise compiling media definitions for complex StreamBlocks (pimarc)
FieldPanel now accepts a 'heading' argument (Jacob Topp-Mugglestone)
Replaced deprecated ugettext / ungettext calls with gettext / ngettext (Mohamed Feddad)
ListBlocks now call child block bulk_to_python if defined (Andy Chosak)
Site settings are now identifiable/cacheable by request as well as site (Andy Babic)
Added select_related attribute to site settings to enable more efficient fetching of foreign key values (Andy Babic)
Add caching of image renditions (Tom Dyson, Tim Kamanin)
Add documentation for reporting security issues and internationalisation (Matt Westcott)
Fields on a custom image model can now be defined as required blank=False (Matt Westcott)
Added ARIA alert role to live search forms in the admin (Casper Timmers)
Reordered login form elements to match expected tab order (Kjartan Sverrisson)
Re-added 'Close Explorer' button on mobile viewports (Sævar Öfjörð Magnússon)
Added a more descriptive label to Password reset link for screen reader users (Casper Timmers, Martin Coote)
Improved Wagtail logo contrast by adding a background (Brian Edelman, Simon Evans, Ben Enright)
Prevent duplicate notification messages on page locking (Jacob Topp-Mugglestone)
Rendering of non field errors for InlinePanel items (Storm Heg)
{% image ... as var %} now clears the context variable when passed None as an image (Maylon Pedroso)
refresh_index method on Elasticsearch no longer fails (Lars van de Kerkhof)
Document tags no longer fail to update when replacing the document file at the same time (Matt Westcott)
Prevent error from very tall / wide images being resized to 0 pixels (Fidel Ramos)
Remove excess margin when editing snippets (Quadric)
Added scope attribute to table headers in TableBlock output (Quadric)
Prevent KeyError when accessing a StreamField on a deferred queryset (Paulo Alvarado)
Hide empty 'view live' links (Karran Besen)
Mark up a few strings for translation (Luiz Boaretto)
Invalid focal_point attribute on image edit view (Michał (Quadric) Sieradzki)
No longer expose the .delete() method on the default Page.objects manager (Nick Smith)
exclude_fields_in_copy on Page models will now work for modelcluster parental / many to many relations (LB (Ben Johnston))
Response header (content disposition) now correctly handles filenames with non-ascii characters when using a storage backend (Rich Brennan)
Improved accessibility fixes for main, header and footer elements in the admin page layout (Mitchel Cabuloy)
Prevent version number from obscuring long settings menus (Naomi Morduch Toubman)
Admin views using TemplateResponse now respect the user's language setting (Jacob Topp-Mugglestone)
Fixed incorrect language code for Japanese in language setting dropdown (Tomonori Tanabe)
Django 2.1 is no longer supported as of this release; please upgrade to Django 2.2 or above before upgrading Wagtail.
Wagtail's wagtail.core.middleware.SiteMiddleware, which makes the current site object available as the property request.site, is now deprecated as it clashes with Django's sites framework and makes unnecessary database queries on non-Wagtail views. References to request.site in your code should be removed; the recommended way of retrieving the current site is Site.find_for_request(request) in Python code, and the {% wagtail_site %} tag within Django templates.
For example:
# old version
def get_menu_items(request):
return request.site.root_page.get_children().live()
# new version
from wagtail.core.models import Site
def get_menu_items(request):
return Site.find_for_request(request).root_page.get_children().live()
{# old version #}
<h1>Welcome to the {{ request.site.site_name }} website!</h1>
{# new version #}
{% load wagtailcore_tags %}
{% wagtail_site as current_site %}
<h1>Welcome to the {{ current_site.site_name }} website!</h1>
Once these are removed, 'wagtail.core.middleware.SiteMiddleware' can be removed from your project's MIDDLEWARE setting.
For consistency with standard Django models, the delete() method is no longer available on the default Page and Collection managers. Code such as Page.objects.delete() should be changed to Page.objects.all().delete().
Replaced deprecated ugettext / ungettext calls with gettext / ngettext (Mohamed Feddad)
MultipleChoiceBlock block type for StreamField (James O'Toole)widget keyword argument (James O'Toole)WAGTAIL_ALLOW_UNICODE_SLUGS (Arkadiusz Michał Ryś)wagtail_serve URL route can now be omitted for headless sites (Storm Heg)preview_modes to an empty list (Casper Timmers)ugettext / ungettext calls with gettext / ngettext (Mohamed Feddad)bulk_to_python if defined (Andy Chosak)select_related attribute to site settings to enable more efficient fetching of foreign key values (Andy Babic)blank=False (Matt Westcott){% image ... as var %} now clears the context variable when passed None as an image (Maylon Pedroso)refresh_index method on Elasticsearch no longer fails (Lars van de Kerkhof)scope attribute to table headers in TableBlock output (Quadric).delete() method on the default Page.objects manager (Nick Smith)exclude_fields_in_copy on Page models will now work for for modelcluster parental / many to many relations (LB (Ben Johnston))main, header and footer elements in the admin page layout (Mitchel Cabuloy)CVE-2020-11037 - avoid potential timing attack on password-protected private pages (Thibaud Colas)
CVE-2020-11037 - avoid potential timing attack on password-protected private pages (Thibaud Colas)
May 4, 2020
This release addresses a potential timing attack on pages or documents that have been protected with a shared password through Wagtail's "Privacy" controls. This password check is performed through a character-by-character string comparison, and so an attacker who is able to measure the time taken by this check to a high degree of accuracy could potentially use timing differences to gain knowledge of the password. (This is understood to be feasible on a local network, but not on the public internet.)
Many thanks to Thibaud Colas for reporting this issue.
CVE-2020-11001 - prevent XSS attack via page revision comparison view (Vlad Gerasimenko, Matt Westcott)
CVE-2020-11001 - prevent XSS attack via page revision comparison view (Vlad Gerasimenko, Matt Westcott)
April 14, 2020
This release addresses a cross-site scripting (XSS) vulnerability on the page revision comparison view within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could potentially craft a page revision history that, when viewed by a user with higher privileges, could perform actions with that user's credentials. The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin.
Many thanks to Vlad Gerasimenko for reporting this issue.
Django 3.0 support (Matt Westcott, Mads Jensen)
get_document_model_string function (Andrey Smirnov)ancestors field to the pages endpoint in admin API (Karl Hobley)Page & Site models (Andreas Bernacca){{ block.super }} example to ModelAdmin customisation in documentation (Dan Swain)sensitive_post_parameters on password reset form (Dan Braghis)WAGTAILEMBEDS_RESPONSIVE_HTML setting to remove automatic addition of responsive-object around embeds (Kalob Taulien)get_document_model location so it can be imported when Models are not yet loaded (Andrey Smirnov)block.super for extra_js & extra_css (Timothy Bautista)FieldRowPanel with a heading (Andreas Bernacca)file_size and file_hash now updated when Document file changed (Andreas Bernacca)verbose_name_plural to form submission model (Janneke Janssen)update_index failures and incorrect front-end rendering on blank TableBlock (Carlo Ascani)2.1, 2.2, 3.0
3.5, 3.6, 3.7, 3.8
2.7 LTS
2.0, 2.1, 2.2
3.5, 3.6, 3.7, 3.8
February 3, 2020
This release is compatible with Django 3.0. Compatibility fixes were contributed by Matt Westcott and Mads Jensen.
The page locking feature has been revised so that the editor locking a page is given exclusive edit access to it, rather than it becoming read-only to everyone. A new Reports menu allows admin / moderator level users to see the currently locked pages, and unlock them if required.
This feature was developed by Karl Hobley and Jacob Topp-Mugglestone. Thanks to The Motley Fool for sponsoring this feature.
Removed leftover Python 2.x compatibility code (Sergey Fedoseev)
Combine flake8 configurations (Sergey Fedoseev)
Improve diffing behavior for text fields (Aliosha Padovani)
Improve contrast of disabled inputs (Nick Smith)
Added get_document_model_string function (Andrey Smirnov)
Added support for Cloudflare API tokens for frontend cache invalidation (Tom Usher)
Cloudflare frontend cache invalidation requests are now sent in chunks of 30 to fit within API limits (Tom Usher)
Added ancestors field to the 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 customization in documentation (Dan Swain)
Add ability to filter image index by a tag (Benedikt Willi)
Add partial experimental support for nested InlinePanels (Matt Westcott, Sam Costigan, Andy Chosak, Scott Cranfill)
Added cache control headers when serving documents (Johannes Vogel)
Use sensitive_post_parameters on password reset form (Dan Braghis)
Add WAGTAILEMBEDS_RESPONSIVE_HTML setting to remove automatic addition of responsive-object around embeds (Kalob Taulien)
Rename documents listing column 'uploaded' to 'created' (LB (Ben Johnston))
Unbundle the l18n library as it was bundled to avoid installation errors which have been resolved (Matt Westcott)
Prevent error when comparing pages that reference a model with a custom primary key (Fidel Ramos)
Moved get_document_model location so it can be imported when Models are not yet loaded (Andrey Smirnov)
Use correct HTML escaping of Jinja2 form templates for StructBlocks (Brady Moe)
All templates with wagtailsettings and modeladmin now use block.super for extra_js & extra_css (Timothy Bautista)
Layout issue when using FieldRowPanel with a heading (Andreas Bernacca)
file_size and file_hash now updated when Document file changed (Andreas Bernacca)
Fixed order of URLs in project template so that static / media URLs are not blocked (Nick Smith)
Added verbose_name_plural to form submission model (Janneke Janssen)
Prevent update_index failures and incorrect front-end rendering on blank TableBlock (Carlo Ascani)
Dropdown initialization on the search page after AJAX call (Eric Sherman)
Make sure all modal chooser search results correspond to the latest search by canceling previous requests (Esper Kuijs)
Django 2.0 is no longer supported as of this release; please upgrade to Django 2.1 or above before upgrading Wagtail.
The behavior of the page locking feature in the admin interface has been changed. In past versions, the page lock would apply to all users including the user who locked the page. Now, the user who locked the page can still edit it but all other users cannot.
Pages that were locked before this release will continue to be locked in the same way as before, so this only applies to newly locked pages. If you would like to restore the previous behavior, you can set the WAGTAILADMIN_GLOBAL_PAGE_EDIT_LOCK setting to True.
In previous versions of Wagtail, embedded media elements were given a class name of responsive-object and an inline padding-bottom style to assist in styling them responsively. These are no longer added by default. To restore the previous behavior, add WAGTAILEMBEDS_RESPONSIVE_HTML = True to your project settings.
For consistency with Django REST Framework, the PagesAPIEndpoint, ImagesAPIEndpoint and DocumentsAPIEndpoint classes have been renamed to PagesAPIViewSet, ImagesAPIViewSet and DocumentsAPIViewSet and moved to the views module in their respective packages. Projects using the Wagtail API should update their registration code accordingly.
Old code:
from wagtail.api.v2.endpoints import PagesAPIEndpoint
from wagtail.api.v2.router import WagtailAPIRouter
from wagtail.images.api.v2.endpoints import ImagesAPIEndpoint
from wagtail.documents.api.v2.endpoints import DocumentsAPIEndpoint
api_router = WagtailAPIRouter('wagtailapi')
api_router.register_endpoint('pages', PagesAPIEndpoint)
api_router.register_endpoint('images', ImagesAPIEndpoint)
api_router.register_endpoint('documents', DocumentsAPIEndpoint)
New code:
from wagtail.api.v2.views import PagesAPIViewSet
from wagtail.api.v2.router import WagtailAPIRouter
from wagtail.images.api.v2.views import ImagesAPIViewSet
from wagtail.documents.api.v2.views import DocumentsAPIViewSet
api_router = WagtailAPIRouter('wagtailapi')
api_router.register_endpoint('pages', PagesAPIViewSet)
api_router.register_endpoint('images', ImagesAPIViewSet)
api_router.register_endpoint('documents', DocumentsAPIViewSet)
The get_document_model function should now be imported from wagtail.documents rather than wagtail.documents.models. See custom_document_model.
The Page and Site models are no longer editable through the Django admin backend. If required these models can be re-registered within your own project using Django's ~django.contrib.admin.ModelAdmin:
# my_app/admin.py
from django.contrib import admin
from wagtail.core.models import Page, Site
admin.site.register(Site)
admin.site.register(Page)
Django 3.0 support (Matt Westcott, Mads Jensen)
get_document_model_string function (Andrey Smirnov)ancestors field to pages endpoint in admin API (Karl Hobley)Page & Site models (Andreas Bernacca)sensitive_post_parameters on password reset form (Dan Braghis)WAGTAILEMBEDS_RESPONSIVE_HTML setting to remove automatic addition of responsive-object around embeds (Kalob Taulien)get_document_model location so it can be imported when Models are not yet loaded (Andrey Smirnov)block.super for extra_js & extra_css (Timothy Bautista)file_size and file_hash not updated when Document file changed (Andreas Bernacca)update_index failures and incorrect front-end rendering on blank TableBlock (Carlo Ascani)CVE-2020-15118 - prevent HTML injection through form field help text (Timothy Bautista, Matt Westcott)
July 20, 2020
This release addresses an HTML injection vulnerability through help text in the wagtail.contrib.forms form builder app. When a form page type is made available to Wagtail editors, and the page template is built using Django's standard form rendering helpers such as form.as_p (as directed in the documentation), any HTML tags used within a form field's help text will be rendered unescaped in the page. Allowing HTML within help text is an intentional design decision by Django (see the docs for ~django.db.models.Field.help_text); however, as a matter of policy Wagtail does not allow editors to insert arbitrary HTML by default, as this could potentially be used to carry out cross-site scripting attacks, including privilege escalation. This functionality should therefore not have been made available to editor-level users.
The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin.
Site owners who wish to re-enable the use of HTML within help text (and are willing to accept the risk of this being exploited by editors) may set WAGTAILFORMS_HELP_TEXT_ALLOW_HTML = True in their configuration settings.
Many thanks to Timothy Bautista for reporting this issue.
Expand Pillow dependency range to include 7.x (Harris Lapiroff, Matt Westcott)
CVE-2020-11037 - avoid potential timing attack on password-protected private pages (Thibaud Colas)
CVE-2020-11037 - avoid potential timing attack on password-protected private pages (Thibaud Colas)
May 4, 2020
This release addresses a potential timing attack on pages or documents that have been protected with a shared password through Wagtail's "Privacy" controls. This password check is performed through a character-by-character string comparison, and so an attacker who is able to measure the time taken by this check to a high degree of accuracy could potentially use timing differences to gain knowledge of the password. (This is understood to be feasible on a local network, but not on the public internet.)
Many thanks to Thibaud Colas for reporting this issue.
CVE-2020-11001 - prevent XSS attack via page revision comparison view (Vlad Gerasimenko, Matt Westcott)
CVE-2020-11001 - prevent XSS attack via page revision comparison view (Vlad Gerasimenko, Matt Westcott)
April 14, 2020
This release addresses a cross-site scripting (XSS) vulnerability on the page revision comparison view within the Wagtail admin interface. A user with a limited-permission editor account for the Wagtail admin could potentially craft a page revision history that, when viewed by a user with higher privileges, could perform actions with that user's credentials. The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin.
Many thanks to Vlad Gerasimenko for reporting this issue.
Fix: Management command startup checks under ManifestStaticFilesStorage no longer fail if collectstatic has not been run first (Alex Tomkins)
ManifestStaticFilesStorage no longer fail if collectstatic has not been run first (Alex Tomkins)January 8, 2020
Management command startup checks under ManifestStaticFilesStorage no longer fail if collectstatic has not been run first (Alex Tomkins)
Improved StreamField design (Bertrand Bordage)
construct_page_listing_buttons hook (Michael van Tellingen)update_all_types workaround, upgrade minimum release to 6.4.0 or above (Jonathan Liuti)WAGTAIL_EMAIL_MANAGEMENT_ENABLED setting to determine whether users can change their email address (Janne Alatalo)WAGTAILDOCS_SERVE_METHOD setting to determine how document downloads will be linked to and served (Tobias McNulty, Matt Westcott)WAGTAIL_MODERATION_ENABLED setting to enable / disable the 'Submit for Moderation' option (Jacob Topp-Mugglestone)register_page_action_menu_item and construct_page_action_menu hooks to override the default menu action (Rahmi Pruitt, Matt Westcott)WAGTAILIMAGES_MAX_IMAGE_PIXELS limit now takes the number of animation frames into account (Karl Hobley)pageurl and slugurl tags no longer fail when request.site is None (Samir Shah)StreamBlock.get_prep_value (Colin Klein)DraftailRichTextArea is no longer treated as a hidden field by Django's form logic (Sergey Fedoseev)DEFAULT_AUTHENTICATION_CLASSES setting no longer breaks the page explorer menu and admin API (Matt Westcott)Wagtail supports PostgreSQL, MySQL, MariaDB and SQLite (with JSON1) as database backends.
This upgrade guide is based on How to upgrade Django to a newer version .
[ 1 ] ( 1 , 2 ) Added in a patch release
Wagtail Space NL
12 – 14 June 2024 in Arnhem, The Netherlands
Wagtail Space US
20 – 22 June 2024 in Philadelphia, USA ✕
November 6, 2019
Wagtail 2.7 is designated a Long Term Support (LTS) release. Long Term Support releases will continue to receive maintenance updates as necessary to address security and data-loss related issues, up until the next LTS release (typically a period of 12 months).
The design of the StreamField user interface has been updated to improve clarity and usability, including better handling of nested blocks. This work was completed by Bertrand Bordage as part of the Wagtail's First Hatch crowdfunding campaign. We would like to thank all supporters of the campaign.
Images can now be uploaded and rendered in WebP format; see image_file_formats for details. This feature was developed by frmdstryr, Karl Hobley and Matt Westcott.
Added Elasticsearch 7 support (pySilver)
Added Python 3.8 support (John Carter, Matt Westcott)
Added construct_page_listing_buttons hook (Michael van Tellingen)
Added more detailed documentation and troubleshooting for installing OpenCV for feature detection (Daniele Procida)
Move and refactor upgrade notification JS (Jonny Scholes)
Remove need for Elasticsearch update_all_types workaround, upgrade minimum release to 6.4.0 or above (Jonathan Liuti)
Add ability to insert internal anchor links/links with fragment identifiers in Draftail (rich text) fields (Iman Syed)
Added Table Block caption for accessibility (Rahmi Pruitt)
Add ability for users to change their own name via the account settings page (Kevin Howbrook)
Add ability to insert telephone numbers as links in Draftail (rich text) fields (Mikael Engström and Liam Brenner)
Increase delay before search in the snippet chooser, to prevent redundant search request round trips (Robert Rollins)
Add WAGTAIL_EMAIL_MANAGEMENT_ENABLED setting to determine whether users can change their email address (Janne Alatalo)
Recognise Soundcloud artist URLs as embeddable (Kiril Staikov)
Add WAGTAILDOCS_SERVE_METHOD setting to determine how document downloads will be linked to and served (Tobias McNulty, Matt Westcott)
Add WAGTAIL_MODERATION_ENABLED setting to enable / disable the 'Submit for Moderation' option (Jacob Topp-Mugglestone) - thanks to The Motley Fool for sponsoring this feature
Added settings to customize pagination page size for the Images admin area (Brian Whitton)
Added ARIA role to TableBlock output (Matt Westcott)
Added cache-busting query parameters to static files within the Wagtail admin (Matt Westcott)
Allow register_page_action_menu_item and construct_page_action_menu hooks to override the default menu action (Rahmi Pruitt, Matt Westcott) - thanks to The Motley Fool for sponsoring review of this feature
WAGTAILIMAGES_MAX_IMAGE_PIXELS limit now takes the number of animation frames into account (Karl Hobley)
Added line breaks to long filenames on multiple image / document uploader (Kevin Howbrook)
Added https support for Scribd oEmbed provider (Rodrigo)
Changed StreamField group label color so labels are visible (Catherine Farman)
Prevented images with a very wide aspect ratio from being displayed distorted in the rich text editor (Iman Syed)
Prevent exception when deleting a model with a protected One-to-one relationship (Neal Todd)
Added labels to snippet bulk edit checkboxes for screen reader users (Martey Dodoo)
Middleware responses during page preview are now properly returned to the user (Matt Westcott)
Default text of page links in rich text uses the public page title rather than the admin display title (Andy Chosak)
Specific page permission checks are now enforced when viewing a page revision (Andy Chosak)
pageurl and slugurl tags no longer fail when request.site is None (Samir Shah)
Output form media on add/edit image forms with custom models (Matt Westcott)
Output form media on add/edit document forms with custom models (Sergey Fedoseev)
Fixes layout for the clear checkbox in default FileField widget (Mikalai Radchuk)
Remove ASCII conversion from Postgres search backend, to support stemming in non-Latin alphabets (Pavel Denisov)
Prevent tab labels on page edit view from being cut off on very narrow screens (Kevin Howbrook)
Very long words in page listings are now broken where necessary (Kevin Howbrook)
Language chosen in user preferences no longer persists on subsequent requests (Bojan Mihelac)
Prevent new block IDs from being assigned on repeated calls to StreamBlock.get_prep_value (Colin Klein)
Prevent broken images in notification emails when static files are hosted on a remote domain (Eduard Luca)
Replace styleguide example avatar with default image to avoid issues when custom user model is used (Matt Westcott)
DraftailRichTextArea is no longer treated as a hidden field by Django's form logic (Sergey Fedoseev)
Replace format() placeholders in translatable strings with % formatting (Matt Westcott)
Altering Django REST Framework's DEFAULT_AUTHENTICATION_CLASSES setting no longer breaks the page explorer menu and admin API (Matt Westcott)
Regression - missing label for external link URL field in link chooser (Stefani Castellanos)
To avoid problems caused by outdated cached JavaScript / CSS files following a Wagtail upgrade, URLs to static files within the Wagtail admin now include a version-specific query parameter of the form ?v=1a2b3c4d. Under certain front-end cache configurations (such as Cloudflare's 'No Query String' caching level), the presence of this parameter may prevent the file from being cached at all. If you are using such a setup, and have some other method in place to expire outdated files (e.g. clearing the cache on deployment), you can disable the query parameter by setting WAGTAILADMIN_STATIC_FILE_VERSION_STRINGS to False in your project settings. (Note that this is automatically disabled when ManifestStaticFilesStorage is in use.)
The internal Page.dummy_request method (which generates an HTTP request object simulating a real page request, for use in previews) has been deprecated, as it did not correctly handle errors generated during middleware processing. Any code that calls this method to render page previews should be updated to use the new method Page.make_preview_request(original_request=None, preview_mode=None), which builds the request and calls Page.serve_preview as a single operation.
This release introduces a new setting WAGTAILDOCS_SERVE_METHOD to control how document downloads are served. On previous versions of Wagtail, document files would always be served through a Django view, to allow permission checks to be applied. When using a remote storage backend such as Amazon S3, this meant that the document would be downloaded to the Django server on every download request.
In Wagtail 2.7, the default behavior on remote storage backends is to redirect to the storage's underlying URL after performing the permission check. If this is unsuitable for your project (for example, your storage provider is configured to block public access, or revealing its URL would be a security risk) you can revert to the previous behavior by setting WAGTAILDOCS_SERVE_METHOD to 'serve_view'.
When customizing the action menu on the page edit view through the register_page_action_menu_item or construct_page_action_menu hook, the ActionMenuItem object's template attribute or render_html method can be overridden to customize the menu item's HTML. As of Wagtail 2.7, the HTML returned from these should not include the enclosing <li> element.
Any add-on library that uses this feature and needs to preserve backward compatibility with previous Wagtail versions can conditionally reinsert the <li> wrapper through its render_html method - for example:
from django.utils.html import format_html from wagtail import VERSION as WAGTAIL_VERSION from wagtail.admin.action_menu import ActionMenuItem class CustomMenuItem(ActionMenuItem): template = 'myapp/my_menu_item.html' def render_html(self, request, parent_context): html = super().render_html(request, parent_context) if WAGTAIL_VERSION < (2, 7): html = format_html('<li>{}</li>', html) return html
The modules wagtail.admin.utils and wagtail.admin.decorators have been deprecated. The helper functions defined here exist primarily for Wagtail's internal use; however, some of them (particularly send_mail and permission_required) may be found in user code, and import lines will need to be updated. The new locations for these definitions are as follows:
Definition |
Old location |
New location |
|---|---|---|
any_permission_required |
wagtail.admin.utils |
wagtail.admin.auth |
permission_denied |
wagtail.admin.utils |
wagtail.admin.auth |
permission_required |
wagtail.admin.utils |
wagtail.admin.auth |
PermissionPolicyChecker |
wagtail.admin.utils |
wagtail.admin.auth |
user_has_any_page_permission |
wagtail.admin.utils |
wagtail.admin.auth |
user_passes_test |
wagtail.admin.utils |
wagtail.admin.auth |
users_with_page_permission |
wagtail.admin.utils |
wagtail.admin.auth |
reject_request |
wagtail.admin.decorators |
wagtail.admin.auth |
require_admin_access |
wagtail.admin.decorators |
wagtail.admin.auth |
get_available_admin_languages |
wagtail.admin.utils |
wagtail.admin.localization |
get_available_admin_time_zones |
wagtail.admin.utils |
wagtail.admin.localization |
get_js_translation_strings |
wagtail.admin.utils |
wagtail.admin.localization |
WAGTAILADMIN_PROVIDED_LANGUAGES |
wagtail.admin.utils |
wagtail.admin.localization |
send_mail |
wagtail.admin.utils |
wagtail.admin.mail |
send_notification |
wagtail.admin.utils |
wagtail.admin.mail |
get_object_usage |
wagtail.admin.utils |
wagtail.admin.models |
popular_tags_for_model |
wagtail.admin.utils |
wagtail.admin.models |
get_site_for_user |
wagtail.admin.utils |
wagtail.admin.navigation |
manage.py collectstatic no longer breaks with ManifestStaticFilesStorage (Matt Westcott)
Changes from 2.7rc1:
manage.py collectstatic no longer breaks with ManifestStaticFilesStorage (Matt Westcott)DEFAULT_AUTHENTICATION_CLASSES setting no longer breaks the page explorer menu and admin API (Matt Westcott)Improved StreamField design (Bertrand Bordage)
construct_page_listing_buttons hook (Michael van Tellingen)update_all_types workaround, upgrade minimum release to 6.4.0 or above (Jonathan Liuti)WAGTAIL_EMAIL_MANAGEMENT_ENABLED setting to determine whether users can change their email address (Janne Alatalo)WAGTAILDOCS_SERVE_METHOD setting to determine how document downloads will be linked to and served (Tobias McNulty, Matt Westcott)WAGTAIL_MODERATION_ENABLED setting to enable / disable the 'Submit for Moderation' option (Jacob Topp-Mugglestone)register_page_action_menu_item and construct_page_action_menu hooks to override the default menu action (Rahmi Pruitt, Matt Westcott)WAGTAILIMAGES_MAX_IMAGE_PIXELS limit now takes the number of animation frames into account (Karl Hobley)pageurl and slugurl tags no longer fail when request.site is None (Samir Shah)StreamBlock.get_prep_value (Colin Klein)DraftailRichTextArea is no longer treated as a hidden field by Django's form logic (Sergey Fedoseev)Fix: Altering Django REST Framework's DEFAULT_AUTHENTICATION_CLASSES setting no longer breaks the page explorer menu and admin API (Matt Westcott)
DEFAULT_AUTHENTICATION_CLASSES setting no longer breaks the page explorer menu and admin API (Matt Westcott)October 22, 2019
Altering Django REST Framework's DEFAULT_AUTHENTICATION_CLASSES setting no longer breaks the page explorer menu and admin API (Matt Westcott)
Prevent search indexing failures on Postgres 9.4 and Django >= 2.2.1 (Matt Westcott)
September 19, 2019
Prevent search indexing failures on Postgres 9.4 and Django >= 2.2.1 (Matt Westcott)
Fix: Prevent Javascript errors caused by unescaped quote characters in translation strings (Matt Westcott)
August 5, 2019
Prevent JavaScript errors caused by unescaped quote characters in translation strings (Matt Westcott)
Added support for short_description for field labels in modeladmin's InspectView (Wesley van Lee)
short_description for field labels in modeladmin's InspectView (Wesley van Lee)image template tag (Deniz Dogan)branding_title template block for the admin title prefix (Dillen Meijboom)process_child_object and exclude_fields arguments to Page.copy() to make it easier for third-party apps to customise copy behavior (Karl Hobley)Page.with_content_json(), allowing revision content loading behaviour to be customised on a per-model basis (Karl Hobley)construct_settings_menu hook (Jordan Bauer, Quadric)dir attribute for the active language (Andreas Bernacca)--chunk_size argument on ./manage.py update_index (Seb Brown)repr method (Alex Tomkins)exclude_fields_in_copy (Karl Hobley)is_stored_locally method to AbstractDocument (jonny5532)August 1, 2019
Wagtail now has official accessibility support targets: we are aiming for compliance with WCAG2.1, AA level. WCAG 2.1 is the international standard that underpins many national accessibility laws.
Wagtail isn't fully compliant just yet, but we have made many changes to the admin interface to get there. We thank the UK Government (in particular the CMS team at the Department for International Trade), who commissioned many of these improvements.
Here are changes that should make Wagtail more usable for all users regardless of abilities:
Increase font-size across the whole admin (Beth Menzies, Katie Locke)
Improved text color contrast across the whole admin (Beth Menzies, Katie Locke)
Added consistent focus outline styles across the whole admin (Thibaud Colas)
Ensured the 'add child page' button displays when focused (Helen Chapman, Katie Locke)
This release also contains many big improvements for screen reader users:
Added more ARIA landmarks across the admin interface and welcome page for screen reader users to navigate the CMS more easily (Beth Menzies)
Improved heading structure for screen reader users navigating the CMS admin (Beth Menzies, Helen Chapman)
Make icon font implementation more screen-reader-friendly (Thibaud Colas)
Removed buggy tab order customizations in the CMS admin (Jordan Bauer)
Screen readers now treat page-level action dropdowns as navigation instead of menus (Helen Chapman)
Fixed occurrences of invalid HTML across the CMS admin (Thibaud Colas)
Add empty alt attributes to all images in the CMS admin (Andreas Bernacca)
Fixed focus not moving to the pages explorer menu when open (Helen Chapman)
We’ve also had a look at how controls are labeled across the UI for screen reader users:
Add image dimensions in image gallery and image choosers for screen reader users (Helen Chapman)
Add more contextual information for screen readers in the explorer menu's links (Helen Chapman)
Make URL generator preview image alt translatable (Thibaud Colas)
Screen readers now announce "Dashboard" for the main nav’s logo link instead of Wagtail's version number (Thibaud Colas)
Remove duplicate labels in image gallery and image choosers for screen reader users (Helen Chapman)
Added a label to the modals' "close" button for screen reader users (Helen Chapman, Katie Locke)
Added labels to permission checkboxes for screen reader users (Helen Chapman, Katie Locke)
Improve screen-reader labels for action links in page listing (Helen Chapman, Katie Locke)
Add screen-reader labels for table headings in page listing (Helen Chapman, Katie Locke)
Add screen reader labels for page privacy toggle, edit lock, status tag in page explorer & edit views (Helen Chapman, Katie Locke)
Add screen-reader labels for dashboard summary cards (Helen Chapman, Katie Locke)
Add screen-reader labels for privacy toggle of collections (Helen Chapman, Katie Locke)
Again, this is still a work in progress – if you are aware of other existing accessibility issues, please do open an issue if there isn't one already.
Added support for short_description for field labels in modeladmin's InspectView (Wesley van Lee)
Rearranged SCSS folder structure to the client folder and split them approximately according to ITCSS. (Naomi Morduch Toubman, Jonny Scholes, Janneke Janssen, Hugo van den Berg)
Added support for specifying cell alignment on TableBlock (Samuel Mendes)
Added more informative error when a non-image object is passed to the image template tag (Deniz Dogan)
Added ButtonHelper examples in the modelAdmin primer page within documentation (Kalob Taulien)
Multiple clarifications, grammar, and typo fixes throughout documentation (Dan Swain)
Use correct URL in API example in documentation (Michael Bunsen)
Move datetime widget initializer JS into the widget's form media instead of page editor media (Matt Westcott)
Add form field prefixes for input forms in chooser modals (Matt Westcott)
Removed version number from the logo link's title. The version can now be found under the Settings menu (Thibaud Colas)
Added "don't delete" option to confirmation screen when deleting images, documents and modeladmin models (Kevin Howbrook)
Added branding_title template block for the admin title prefix (Dillen Meijboom)
Added support for custom search handler classes to modeladmin's IndexView, and added a class that uses the default Wagtail search backend for searching (Seb Brown, Andy Babic)
Update group edit view to expose the Permission object for each checkbox (George Hickman)
Improve performance of Pages for Moderation panel (Fidel Ramos)
Added process_child_object and exclude_fields arguments to Page.copy() to make it easier for third-party apps to customize copy behavior (Karl Hobley)
Added Page.with_content_json(), allowing revision content loading behavior to be customized on a per-model basis (Karl Hobley)
Added construct_settings_menu hook (Jordan Bauer, Quadric)
Fixed compatibility of date / time choosers with wagtail-react-streamfield (Mike Hearn)
Performance optimization of several admin functions, including breadcrumbs, home and index pages (Fidel Ramos)
ModelAdmin no longer fails when filtering over a foreign key relation (Jason Dilworth, Matt Westcott)
The Wagtail version number is now visible within the Settings menu (Kevin Howbrook)
Scaling images now rounds values to an integer so that images render without errors (Adrian Brunyate)
Revised test decorator to ensure TestPageEditHandlers test cases run correctly (Alex Tomkins)
Wagtail bird animation in admin now ends correctly on all browsers (Deniz Dogan)
Explorer menu no longer shows sibling pages for which the user does not have access (Mike Hearn)
Admin HTML now includes the correct dir attribute for the active language (Andreas Bernacca)
Fix type error when using --chunk_size argument on ./manage.py update_index (Seb Brown)
Avoid rendering entire form in EditHandler's repr method (Alex Tomkins)
Add empty alt attributes to HTML output of Embedly and oEmbed embed finders (Andreas Bernacca)
Clear pending AJAX request if error occurs on page chooser (Matt Westcott)
Prevent text from overlapping in focal point editing UI (Beth Menzies)
Restore custom "Date" icon for scheduled publishing panel in Edit page’s Settings tab (Helen Chapman)
Added missing form media to user edit form template (Matt Westcott)
Page.copy() no longer copies child objects when the accessor name is included in exclude_fields_in_copy (Karl Hobley)
Clicking the privacy toggle while the page is still loading no longer loads the wrong data in the page (Helen Chapman)
Added missing is_stored_locally method to AbstractDocument (jonny5532)
Query model no longer removes punctuation as part of string normalization (William Blackie)
Make login test helper work with user models with non-default username fields (Andrew Miller)
Delay dirty form check to prevent "unsaved changes" warning from being wrongly triggered (Thibaud Colas)
Python 3.4 is no longer supported as of this release; please upgrade to Python 3.5 or above before upgrading Wagtail.
The icon font implementation has been changed to be invisible for screen-reader users, by switching to using Private Use Areas Unicode code points. All of the icon classes (icon-user, icon-search, etc) should still work the same, except for two which have been removed because they were duplicates:
icon-picture is removed. Use icon-image instead (same visual).
icon-file-text-alt is removed. Use icon-doc-full instead (same visual).
For a list of all available icons, please see the styleguide.
Added support for short_description for field labels in modeladmin's InspectView (Wesley van Lee)
short_description for field labels in modeladmin's InspectView (Wesley van Lee)image template tag (Deniz Dogan)branding_title template block for the admin title prefix (Dillen Meijboom)process_child_object and exclude_fields arguments to Page.copy() to make it easier for third-party apps to customise copy behavior (Karl Hobley)Page.with_content_json(), allowing revision content loading behaviour to be customised on a per-model basis (Karl Hobley)construct_settings_menu hook (Jordan Bauer, Quadric)dir attribute for the active language (Andreas Bernacca)--chunk_size argument on ./manage.py update_index (Seb Brown)repr method (Alex Tomkins)exclude_fields_in_copy (Karl Hobley)is_stored_locally method to AbstractDocument (jonny5532)Fix: Delay dirty form check to prevent "unsaved changes" warning from being wrongly triggered (Thibaud Colas)
August 1, 2019
Delay dirty form check to prevent "unsaved changes" warning from being wrongly triggered (Thibaud Colas)
Fix: Prevent crash when comparing StructBlocks in revision history (Adrian Turjak, Matt Westcott)
May 7, 2019
Prevent crash when comparing StructBlocks in revision history (Adrian Turjak, Matt Westcott)
Django 2.2 support (Matt Westcott, Andy Babic)
|richtext filter is applied to a non-string value (mukesh5)search_auto_update attribute (Karl Hobley)<p> and <br> elements with attributes (Matt Westcott)manage.py wagtail_update_index alias to avoid clashes with update_index commands from other packages (Matt Westcott)target_model argument on PageChooserBlock to page_type (Loic Teixeira)edit_handler and panels can now be defined on a ModelAdmin definition (Thomas Kremmel)TAG_LIMIT to limit number of tags that can be added to any taggit model (Mani)ModelAdmin to documentation (LB (Ben Johnston), Andy Babic){% pageurl %} (Arthur Holzner)blockquote, superscript, subscript, strikethrough, code (Md Arifin Ibne Matin)max_count_per_parent option on page models to limit the number of pages of a given type that can be created under one parent page (Wesley van Lee)StreamField field blocks now accept a validators argument (Tom Usher)** for bold, _ for italic, etc. (Thibaud Colas)external and email links (Md Arifin Ibne Matin)SERVER_PORT to 443 in Page.dummy_request() for HTTPS sites (Sergey Fedoseev)Host header of Page.dummy_request() (Sergey Fedoseev)InlinePanel no longer count towards max_num when disabling the 'add' button (Todd Dembrey, Thibaud Colas)postgres_search queries (Hammy Goonan)routablepageurl tag now correctly omits domain part when multiple sites exist at the same root (Gassan Gousseinov)send_mail now correctly uses the html_message kwarg for HTML messages (Tiago Requeijo)max_count (Andy Babic)get_admin_display_title methods on parent page and breadcrumb (Haydn Greatnews)zh_Hans and zh_Hant (Matt Westcott)Embed.thumbnail_url to 255 characters (Kevin Howbrook)April 24, 2019
This release is compatible with Django 2.2. Compatibility fixes were contributed by Matt Westcott and Andy Babic.
Wagtail’s rich text editor now supports using Markdown shortcuts for inline formatting:
** for bold
_ for italic
~ for strikethrough (if enabled)
` for code (if enabled)
To learn other shortcuts, have a look at the keyboard shortcuts reference.
Added support for customizing EditHandler-based forms on a per-request basis (Bertrand Bordage)
Added more informative error message when |richtext filter is applied to a non-string value (mukesh5)
Automatic search indexing can now be disabled on a per-model basis via the search_auto_update attribute (Karl Hobley)
Improved diffing of StreamFields when comparing page revisions (Karl Hobley)
Highlight broken links to pages and missing documents in rich text (Brady Moe)
Preserve links when copy-pasting rich text content from Wagtail to other tools (Thibaud Colas)
Rich text to contentstate conversion now prioritizes more specific rules, to accommodate <p> and <br> elements with attributes (Matt Westcott)
Added limit image upload size by number of pixels (Thomas Elliott)
Added manage.py wagtail_update_index alias to avoid clashes with update_index commands from other packages (Matt Westcott)
Renamed target_model argument on PageChooserBlock to page_type (Loic Teixeira)
edit_handler and panels can now be defined on a ModelAdmin definition (Thomas Kremmel)
Add Learn Wagtail to third-party tutorials in documentation (Matt Westcott)
Add a Django setting TAG_LIMIT to limit number of tags that can be added to any taggit model (Mani)
Added instructions on how to generate urls for ModelAdmin to documentation (LB (Ben Johnston), Andy Babic)
Added option to specify a fallback URL on {% pageurl %} (Arthur Holzner)
Add support for more rich text formats, disabled by default: blockquote, superscript, subscript, strikethrough, code (Md Arifin Ibne Matin)
Added max_count_per_parent option on page models to limit the number of pages of a given type that can be created under one parent page (Wesley van Lee)
StreamField field blocks now accept a validators argument (Tom Usher)
Added edit / delete buttons to snippet index and "don't delete" option to confirmation screen, for consistency with pages (Kevin Howbrook)
Added name attributes to all built-in page action menu items (LB (Ben Johnston))
Added validation on the filter string to the Jinja2 image template tag (Jonny Scholes)
Changed the pages reordering UI toggle to make it easier to find (Katie Locke, Thibaud Colas)
Added support for rich text link rewrite handlers for external and email links (Md Arifin Ibne Matin)
Clarify installation instructions in documentation, especially regarding virtual environments. (Naomi Morduch Toubman)
Set SERVER_PORT to 443 in Page.dummy_request() for HTTPS sites (Sergey Fedoseev)
Include port number in Host header of Page.dummy_request() (Sergey Fedoseev)
Validation error messages in InlinePanel no longer count towards max_num when disabling the 'add' button (Todd Dembrey, Thibaud Colas)
Rich text to contentstate conversion now ignores stray closing tags (frmdstryr)
Escape backslashes in postgres_search queries (Hammy Goonan)
Parent page link in page chooser search results no longer navigates away (Asanka Lihiniyagoda, Sævar Öfjörð Magnússon)
routablepageurl tag now correctly omits domain part when multiple sites exist at the same root (Gassan Gousseinov)
Added missing collection column specifier on document listing template (Sergey Fedoseev)
Page Copy will now also copy ParentalManyToMany field relations (LB (Ben Johnston))
Admin HTML header now includes correct language code (Matt Westcott)
Unclear error message when saving image after focal point edit (Hugo van den Berg)
Increase max length on Embed.thumbnail_url to 255 characters (Kevin Howbrook)
send_mail now correctly uses the html_message kwarg for HTML messages (Tiago Requeijo)
Page copying no longer allowed if page model has reached its max_count (Andy Babic)
Don't show page type on page chooser button when multiple types are allowed (Thijs Kramer)
Make sure page chooser search results correspond to the latest search by canceling previous requests (Esper Kuijs)
Inform user when moving a page from one parent to another where there is an already existing page with the same slug (Casper Timmers)
User add/edit forms now support form widgets with JS/CSS media (Damian Grinwis)
Rich text processing now preserves non-breaking spaces instead of converting them to normal spaces (Wesley van Lee)
Prevent autocomplete dropdowns from appearing over date choosers on Chrome (Kevin Howbrook)
Prevent crash when logging HTTP errors on Cloudflare cache purging (Kevin Howbrook)
Prevent rich text editor crash when filtering copy-pasted content and the last block is to be removed, e.g. unsupported image (Thibaud Colas)
Removing rich text links / documents now also works when the text selection is backwards (Thibaud Colas)
Prevent the rich text editor from crashing when copy-paste filtering removes all of its content (Thibaud Colas)
Page chooser now respects custom get_admin_display_title methods on parent page and breadcrumb (Haydn Greatnews)
Added consistent whitespace around sortable table headings (Matt Westcott)
Moved locale names for Chinese (Simplified) and Chinese (Traditional) to zh_Hans and zh_Hant (Matt Westcott)
The internal EditHandler methods bind_to_model and bind_to_instance have been deprecated, in favor of a new combined bind_to method which accepts model, instance, request and form as optional keyword arguments. Any user code which calls EditHandler.bind_to_model(model) should be updated to use EditHandler.bind_to(model=model) instead; any user code which calls EditHandler.bind_to_instance(instance, request, form) should be updated to use EditHandler.bind_to(instance=instance, request=request, form=form).
Several changes have been made to pagination handling within the Wagtail admin; these are internal API changes, but may affect applications and third-party packages that add new paginated object listings, including chooser modals, to the admin. The paginate function in wagtail.utils.pagination has been deprecated in favor of the django.core.paginator.Paginator.get_page method introduced in Django 2.0 - a call such as:
from wagtail.utils.pagination import paginate
paginator, page = paginate(request, object_list, per_page=25)
should be replaced with:
from django.core.paginator import Paginator
paginator = Paginator(object_list, per_page=25)
page = paginator.get_page(request.GET.get('p'))
Additionally, the is_ajax flag on the template wagtailadmin/shared/pagination_nav.html has been deprecated in favour of a new template wagtailadmin/shared/ajax_pagination_nav.html:
{% include "wagtailadmin/shared/pagination_nav.html" with items=page_obj is_ajax=1 %}
should become:
{% include "wagtailadmin/shared/ajax_pagination_nav.html" with items=page_obj %}
Wagtail now has built-in support for new rich text formats, disabled by default:
blockquote, using the blockquote Draft.js block type, saved as a <blockquote> tag.
superscript, using the SUPERSCRIPT Draft.js inline style, saved as a <sup> tag.
subscript, using the SUBSCRIPT Draft.js inline style, saved as a <sub> tag.
strikethrough, using the STRIKETHROUGH Draft.js inline style, saved as a <s> tag.
code, using the CODE Draft.js inline style, saved as a <code> tag.
Projects already using those exact Draft.js type and HTML tag combinations can safely replace their feature definitions with the new built-ins. Projects that use the same feature identifier can keep their existing feature definitions as overrides. Finally, if the Draft.js types / HTML tags are used but with a different combination, do not enable the new feature definitions to avoid conflicts in storage or editor behavior.
The FeatureRegistry.register_link_type and FeatureRegistry.register_embed_type methods, which define how links and embedded media in rich text are converted to HTML, now accept a handler class. Previously, they were passed an identifier string and a rewrite function. For details of updating your code to the new convention, see rich_text_rewrite_handlers.
The translations for Chinese (Simplified) and Chinese (Traditional) are now available under the locale names zh_Hans and zh_Hant respectively, rather than zh_CN and zh_TW. Projects that currently use the old names for the LANGUAGE_CODE setting may need to update the settings file to use the new names.
Django 2.2 support (Matt Westcott, Andy Babic)
|richtext filter is applied to a non-string value (mukesh5)search_auto_update attribute (Karl Hobley)<p> and <br> elements with attributes (Matt Westcott)manage.py wagtail_update_index alias to avoid clashes with update_index commands from other packages (Matt Westcott)target_model argument on PageChooserBlock to page_type (Loic Teixeira)edit_handler and panels can now be defined on a ModelAdmin definition (Thomas Kremmel)TAG_LIMIT to limit number of tags that can be added to any taggit model (Mani)ModelAdmin to documentation (LB (Ben Johnston), Andy Babic){% pageurl %} (Arthur Holzner)blockquote, superscript, subscript, strikethrough, code (Md Arifin Ibne Matin)max_count_per_parent option on page models to limit the number of pages of a given type that can be created under one parent page (Wesley van Lee)StreamField field blocks now accept a validators argument (Tom Usher)** for bold, _ for italic, etc. (Thibaud Colas)external and email links (Md Arifin Ibne Matin)SERVER_PORT to 443 in Page.dummy_request() for HTTPS sites (Sergey Fedoseev)Host header of Page.dummy_request() (Sergey Fedoseev)InlinePanel no longer count towards max_num when disabling the 'add' button (Todd Dembrey, Thibaud Colas)postgres_search queries (Hammy Goonan)routablepageurl tag now correctly omits domain part when multiple sites exist at the same root (Gassan Gousseinov)send_mail now correctly uses the html_message kwarg for HTML messages (Tiago Requeijo)max_count (Andy Babic)get_admin_display_title methods on parent page and breadcrumb (Haydn Greatnews)zh_Hans and zh_Hant (Matt Westcott)Added support for Python 3.7 (Matt Westcott)
max_count option on page models to limit the number of pages of a particular type that can be created (Dan Braghis)file_hash field to documents (Karl Hobley, Dan Braghis)copy() methods in Page subclasses to be called from the page copy view (Robert Rollins)LocaleMiddleware (Benjamin Bach)functools.partial() instead of django.utils.functional.curry() (Sergey Fedoseev)before_move_page and after_move_page hooks (Maylon Pedroso)PageQuerySet.type_q can now be merged with | (Brady Moe)rel="noopener noreferrer" to target blank links (Anselm Bradford)December 19, 2018
When using the wagtail start command to make a new site, users will now be greeted with a proper starter page. Thanks to Timothy Allen and Scott Cranfill for pulling this off!
Added support for Python 3.7 (Matt Westcott)
Added max_count option on page models to limit the number of pages of a particular type that can be created (Dan Braghis)
Document and image choosers now show the document / image's collection (Alejandro Garza, Janneke Janssen)
New image_url template tag allows to generate dynamic image URLs, so image renditions are being created outside the main request which improves performance. Requires extra configuration, see /advanced_topics/images/image_serve_view (Yannick Chabbert, Dan Braghis).
Added ability to run individual tests through tox (Benjamin Bach)
Collection listings are now ordered by name (Seb Brown)
Added file_hash field to documents (Karl Hobley, Dan Braghis)
Added last login to the user overview (Noah B Johnson)
Changed design of image editing page (Janneke Janssen, Ben Enright)
Added Slovak character map for JavaScript slug generation (Andy Chosak)
Make documentation links on welcome page work for prereleases (Matt Westcott)
Allow overridden copy() methods in Page subclasses to be called from the page copy view (Robert Rollins)
Users without a preferred language set on their profile now use language selected by Django's LocaleMiddleware (Benjamin Bach)
Added hooks to customize the actions menu on the page create/edit views (Matt Westcott)
Cleanup: Use functools.partial() instead of django.utils.functional.curry() (Sergey Fedoseev)
Added before_move_page and after_move_page hooks (Maylon Pedroso)
Bulk deletion button for snippets is now hidden until items are selected (Karl Hobley)
Query objects returned from PageQuerySet.type_q can now be merged with | (Brady Moe)
Add rel="noopener noreferrer" to target blank links (Anselm Bradford)
Additional fields on custom document models now show on the multiple document upload view (Robert Rollins, Sergey Fedoseev)
Help text does not overflow when using a combination of BooleanField and FieldPanel in page model (Dzianis Sheka)
Document chooser now displays more useful help message when there are no documents in Wagtail document library (gmmoraes, Stas Rudakou)
Allow custom logos of any height in the admin menu (Meteor0id)
Allow nav menu to take up all available space instead of scrolling (Meteor0id)
Users without the edit permission no longer see "Edit" links in list of pages waiting for moderation (Justin Focus, Fedor Selitsky)
Redirects now return 404 when destination is unspecified or a page with no site (Hillary Jeffrey)
Refactor all breakpoint definitions, removing style overlaps (Janneke Janssen)
Updated draftjs_exporter to 2.1.5 to fix bug in handling adjacent entities (Thibaud Colas)
Page titles consisting only of stopwords now generate a non-empty default slug (Andy Chosak, Janneke Janssen)
Sitemap generator now allows passing a sitemap instance in the URL configuration (Mitchel Cabuloy, Dan Braghis)
Django 1.11 is no longer supported in this release; please upgrade your project to Django 2.0 or 2.1 before upgrading to Wagtail 2.4.
Projects with a custom image model (see custom_image_model) created on Wagtail 1.7 or earlier are likely to have one or more migrations that refer to the (now-deleted) wagtailimages.Filter model. In Wagtail 2.4, the migrations that defined this model have been squashed, which may result in the error ValueError: Related model 'wagtailimages.Filter' cannot be resolved when bringing up a new instance of the database. To rectify this, check your project's migrations for ForeignKey references to wagtailimages.Filter, and change them to IntegerField definitions. For example, the line:
('filter', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailimages.Filter')),
should become:
('filter', models.IntegerField(blank=True, null=True)),
Added support for Python 3.7 (Matt Westcott)
max_count option on page models to limit the number of pages of a particular type that can be created (Dan Braghis)file_hash field to documents (Karl Hobley, Dan Braghis)copy() methods in Page subclasses to be called from the page copy view (Robert Rollins)LocaleMiddleware (Benjamin Bach)functools.partial() instead of django.utils.functional.curry() (Sergey Fedoseev)before_move_page and after_move_page hooks (Maylon Pedroso)PageQuerySet.type_q can now be merged with | (Brady Moe)rel="noopener noreferrer" to target blank links (Anselm Bradford)Added support for Django 2.1 (Ryan Verner, Matt Westcott)
download_url field to images in the API (Michael Harrison)wagtail.admin.forms to make it less prone to circular imports (Matt Westcott)October 23, 2018
Wagtail 2.3 is designated a Long Term Support (LTS) release. Long Term Support releases will continue to receive maintenance updates as necessary to address security and data-loss related issues, up until the next LTS release (typically a period of 8 months).
Note that Wagtail 2.3 will be the last release branch to support Django 1.11.
Wagtail is now compatible with Django 2.1. Compatibility fixes were contributed by Ryan Verner and Matt Westcott.
Colour contrast within the admin interface has been improved, and now complies with WCAG 2 level AA. This was completed by Coen van der Kamp and Naomi Morduch Toubman based on earlier work from Edd Baldry, Naa Marteki Reed and Ben Enright.
Added 'scale' image filter (Oliver Wilkerson)
Added meta tag to prevent search engines from indexing admin pages (Karl Hobley)
EmbedBlock now validates against recognized embed providers on save (Bertrand Bordage)
Made cache control headers on Wagtail admin consistent with Django admin (Tomasz Knapik)
Notification emails now include an "Auto-Submitted: auto-generated" header (Dan Braghis)
Image chooser panels now show alt text as title (Samir Shah)
Added download_url field to images in the API (Michael Harrison)
Dummy requests for preview now preserve the HTTP Authorization header (Ben Dickinson)
Respect next param on login (Loic Teixeira)
InlinePanel now handles relations that specify a related_query_name (Aram Dulyan)
before_delete_page / after_delete_page hooks now run within the same database transaction as the page deletion (Tomasz Knapik)
Seek to the beginning of image files when uploading, to restore compatibility with django-storages Google Cloud and Azure backends (Mikalai Radchuk)
Snippet chooser modal no longer fails on snippet models with UUID primary keys (Sævar Öfjörð Magnússon)
Restored localization in date/time pickers (David Moore, Thibaud Colas)
Tag input field no longer treats 'б' on Russian keyboards as a comma (Michael Borisov)
Disabled autocomplete dropdowns on date/time chooser fields (Janneke Janssen)
Split up wagtail.admin.forms to make it less prone to circular imports (Matt Westcott)
Disable linking to root page in rich text, making the page non-functional (Matt Westcott)
Pages should be editable and save-able even if there are broken page or document links in rich text (Matt Westcott)
Avoid redundant round-trips of JSON StreamField data on save, improving performance and preventing consistency issues on fixture loading (Andy Chosak, Matt Westcott)
Users are not logged out when changing their own password through the Users area (Matt Westcott)
The wagtail.admin.forms module has been split up into submodules to make it less prone to producing circular imports, particularly when a custom user model is in use. The following (undocumented) definitions have now been moved to new locations:
Definition |
New location |
|---|---|
LoginForm |
wagtail.admin.forms.auth |
PasswordResetForm |
wagtail.admin.forms.auth |
URLOrAbsolutePathValidator |
wagtail.admin.forms.choosers |
URLOrAbsolutePathField |
wagtail.admin.forms.choosers |
ExternalLinkChooserForm |
wagtail.admin.forms.choosers |
EmailLinkChooserForm |
wagtail.admin.forms.choosers |
CollectionViewRestrictionForm |
wagtail.admin.forms.collections |
CollectionForm |
wagtail.admin.forms.collections |
BaseCollectionMemberForm |
wagtail.admin.forms.collections |
BaseGroupCollectionMemberPermissionFormSet |
wagtail.admin.forms.collections |
collection_member_permission_formset_factory |
wagtail.admin.forms.collections |
CopyForm |
wagtail.admin.forms.pages |
PageViewRestrictionForm |
wagtail.admin.forms.pages |
SearchForm |
wagtail.admin.forms.search |
BaseViewRestrictionForm |
wagtail.admin.forms.view_restrictions |
The following definitions remain in wagtail.admin.forms: FORM_FIELD_OVERRIDES, DIRECT_FORM_FIELD_OVERRIDES, formfield_for_dbfield, WagtailAdminModelFormMetaclass, WagtailAdminModelForm and WagtailAdminPageForm.
Added support for Django 2.1 (Ryan Verner, Matt Westcott)
download_url field to images in the API (Michael Harrison)wagtail.admin.forms to make it less prone to circular imports (Matt Westcott)Added support for Django 2.1 (Ryan Verner, Matt Westcott)
download_url field to images in the API (Michael Harrison)wagtail.admin.forms to make it less prone to circular imports (Matt Westcott)Fix: Seek to the beginning of image files when uploading, to restore compatibility with django-storages Google Cloud and Azure backends (Mikalai Radch
August 29, 2018
Seek to the beginning of image files when uploading, to restore compatibility with django-storages Google Cloud and Azure backends (Mikalai Radchuk)
Respect next param on login (Loic Teixeira)
Fix: Pin Beautiful Soup to 4.6.0 due to further regressions in formatting empty elements (Matt Westcott)
August 13, 2018
Pin Beautiful Soup to 4.6.0 due to further regressions in formatting empty elements (Matt Westcott)
Prevent AppRegistryNotReady error when wagtail.contrib.sitemaps is in INSTALLED_APPS (Matt Westcott)
Added faceted search using the .facet() method (Karl Hobley)
.facet() method (Karl Hobley)annotate_score support to PostgreSQL search backend (Bertrand Bordage){% slugurl %} template tag is now site-aware (Samir Shah)file_size field to documents (Karl Hobley)file_hash field to images (Karl Hobley)defer flag to PageQuerySet.specific (Karl Hobley)eval(), for better CSP compliance (Matt Westcott)Image.get_file_size (Andrew Plummer)August 10, 2018
Wagtail search now includes support for facets, allowing you to display search result counts broken down by a particular field value. For further details, see wagtailsearch_faceted_search. This feature was developed by Karl Hobley.
The page search in the Wagtail admin now supports filtering by page type and ordering search results by title, creation date and status. This feature was developed by Karl Hobley.
Added another valid AudioBoom oEmbed pattern (Bertrand Bordage)
Added annotate_score support to PostgreSQL search backend (Bertrand Bordage)
Pillow's image optimization is now applied when saving PNG images (Dmitry Vasilev)
JS / CSS media files can now be associated with Draftail feature definitions (Matt Westcott)
The {% slugurl %} template tag is now site-aware (Samir Shah)
Added file_size field to documents (Karl Hobley)
Added file_hash field to images (Karl Hobley)
Update documentation (configuring Django for Wagtail) to contain all current settings options (Matt Westcott, LB (Ben Johnston))
Added defer flag to PageQuerySet.specific (Karl Hobley)
Snippets can now be deleted from the listing view (LB (Ben Johnston))
Increased max length of redirect URL field to 255 (Michael Harrison)
Added documentation for new JS/CSS media files association with Draftail feature definitions (Ed Henderson)
Added accessible color contrast guidelines to the style guide (Catherine Farman)
Admin modal views no longer rely on JavaScript eval(), for better CSP compliance (Matt Westcott)
Update editor guide for embeds and documents in rich text (Kevin Howbrook)
Improved performance of sitemap generation (Michael van Tellingen, Bertrand Bordage)
Added an internal API for autocomplete (Karl Hobley)
Handle all exceptions from Image.get_file_size (Andrew Plummer)
Fix display of breadcrumbs in ModelAdmin (LB (Ben Johnston))
Remove duplicate border radius of avatars (Benjamin Thurm)
Site.get_site_root_paths() preferring other sites over the default when some sites share the same root_page (Andy Babic)
Pages with missing model definitions no longer crash the API (Abdulmalik Abdulwahab)
Rich text image chooser no longer skips format selection after a validation error (Matt Westcott)
Null characters in URLs no longer crash the redirect middleware on PostgreSQL (Andrew Crewdson, Matt Westcott)
Permission checks no longer prevent a non-live page from being unscheduled (Abdulmalik Abdulwahab)
Copy-paste between Draftail editors now preserves all formatting/content (Thibaud Colas)
Fix alignment of checkboxes and radio buttons on Firefox (Matt Westcott)
The wagtail.admin.modal_workflow module (used internally by Wagtail to handle modal popup interfaces such as the page chooser) has been updated to avoid returning JavaScript code as part of HTTP responses. User code that relies on this functionality can be updated as follows:
Eliminate template tags from the .js template. Any dynamic data needed by the template can instead be passed in a dict to render_modal_workflow, as a keyword argument json_data; this data will then be available as the second parameter of the JavaScript function.
At the point where you call the ModalWorkflow constructor, add an onload option - a dictionary of functions to be called on loading each step of the workflow. Move the code from the .js template into this dictionary. Then, on the call to render_modal_workflow, rather than passing the .js template name (which should now be replaced by None), pass a step item in the json_data dictionary to indicate the onload function to be called.
Additionally, if your code calls loadResponseText as part of a jQuery AJAX callback, this should now be passed all three arguments from the callback (the response data, status string and XMLHttpRequest object).
The Page.get_sitemap_urls() method used by the wagtail.contrib.sitemaps module has been updated to receive an optional request keyword argument. If you have overridden this method in your page models, you will need to update the method signature to accept this argument (and pass it on when calling super, if applicable).
Added faceted search using the .facet() method (Karl Hobley)
.facet() method (Karl Hobley)annotate_score support to PostgreSQL search backend (Bertrand Bordage){% slugurl %} template tag is now site-aware (Samir Shah)file_size field to documents (Karl Hobley)file_hash field to images (Karl Hobley)defer flag to PageQuerySet.specific (Karl Hobley)eval(), for better CSP compliance (Matt Westcott)Image.get_file_size (Andrew Plummer)Added faceted search using the .facet() method (Karl Hobley)
.facet() method (Karl Hobley)annotate_score support to PostgreSQL search backend (Bertrand Bordage){% slugurl %} template tag is now site-aware (Samir Shah)file_size field to documents (Karl Hobley)file_hash field to images (Karl Hobley)defer flag to PageQuerySet.specific (Karl Hobley)eval(), for better CSP compliance (Matt Westcott)Image.get_file_size (Andrew Plummer)Fix: Pin Beautiful Soup to 4.6.0 due to further regressions in formatting empty elements (Matt Westcott)
August 13, 2018
Pin Beautiful Soup to 4.6.0 due to further regressions in formatting empty elements (Matt Westcott)
Fix: Bundle the l18n package to avoid installation issues on systems with a non-Unicode locale (Matt Westcott)
August 6, 2018
Bundle the l18n package to avoid installation issues on systems with a non-Unicode locale (Matt Westcott)
Mark Beautiful Soup 4.6.1 as incompatible due to bug in formatting empty elements (Matt Westcott)
Fix: Site.get_site_root_paths() preferring other sites over the default when some sites share the same root_page (Andy Babic)
July 4, 2018
Fix Site.get_site_root_paths() preferring other sites over the default when some sites share the same root_page (Andy Babic)
Rich text image chooser no longer skips format selection after a validation error (Matt Westcott)
Null characters in URLs no longer crash the redirect middleware on PostgreSQL (Matt Westcott)
Add HelpPanel to add HTML within an edit form (Keving Chung)
HelpPanel to add HTML within an edit form (Keving Chung)assert statements from Wagtail API (Kim Chee Leong)jquery-datetimepicker dependency to make Wagtail more CSP-friendly (unsafe-eval) (Mike Kamermans)wagtail command on Python <3.4 (Matt Westcott)update_index management command now accepts a --chunk_size option to determine the number of items to load at once (Dave Bell)register_account_menu_item to add new account preference items (Michael van Tellingen)wagtail_icon template tag to facilitate making admin icons accessible (Sander Tuit)ALLOWED_HOSTS in the project template to allow any host in development (Tom Dyson)WAGTAILFRONTENDCACHE_LANGUAGES setting to specify the languages whose URLs are to be purged when using i18n_patterns (PyMan Claudio Marinozzi)extra_footer_actions template blocks for customising the add/edit page views (Arthur Holzner)WAGTAILADMIN_RICH_TEXT_EDITORS setting (Todd Dembrey)UserAttributeSimilarityValidator is now correctly enforced on user creation / editing forms (Tim Heap)get_admin_display_title methods (Kim Chee Leong)get_admin_display_title methods (Arthur Holzner, Wietze Helmantel, Matt Westcott)update_index for ParentalManyToManyField to fix crash (Tim Kamanin)get_admin_display_title methods when sorting <100 pages (Matt Westcott)May 22, 2018
A new panel type HelpPanel allows you to easily add HTML within an edit form. This new feature was developed by Kevin Chung.
Users can now upload profile pictures directly through the Account Settings menu, rather than using Gravatar. Gravatar is still used as a fallback if no profile picture has been uploaded directly; a new setting WAGTAIL_GRAVATAR_PROVIDER_URL has been added to specify an alternative provider, or disable the use of external avatars completely. This feature was developed by Daniel Chimeno, Pierre Geier and Matt Westcott.
The API now includes an endpoint for finding pages by path; see apiv2_finding_pages_by_path. This feature was developed by Karl Hobley.
Users can now set their current time zone through the Account Settings menu, which will then be reflected in date / time fields throughout the admin (such as go-live / expiry dates). The list of available time zones can be configured via the WAGTAIL_USER_TIME_ZONES setting. This feature was developed by David Moore.
Wagtail now supports Elasticsearch 6. See wagtailsearch_backends_elasticsearch for configuration details. This feature was developed by Karl Hobley.
Persist tab hash in URL to allow direct navigation to tabs in the admin interface (Ben Weatherman)
Animate the chevron icon when opening sub-menus in the admin (Carlo Ascani)
Look through the target link and target page slug (in addition to the old slug) when searching for redirects in the admin (Michael Harrison)
Remove support for IE6 to IE9 from project template (Samir Shah)
Remove outdated X-UA-Compatible meta from admin template (Thibaud Colas)
Add JavaScript source maps in production build for packaged Wagtail (Thibaud Colas)
Removed assert statements from Wagtail API (Kim Chee Leong)
Update jquery-datetimepicker dependency to make Wagtail more CSP-friendly (unsafe-eval) (Pomax)
Added error notification when running the wagtail command on Python <3.4 (Matt Westcott)
update_index management command now accepts a --chunk_size option to determine the number of items to load at once (Dave Bell)
Added hook register_account_menu_item to add new account preference items (Michael van Tellingen)
Added change email functionality from the account settings (Alejandro Garza, Alexs Mathilda)
Add request parameter to edit handlers (Rajeev J Sebastian)
ImageChooser now sets a default title based on filename (Coen van der Kamp)
Added error handling to the Draftail editor (Thibaud Colas)
Add new wagtail_icon template tag to facilitate making admin icons accessible (Sander Tuit)
Set ALLOWED_HOSTS in the project template to allow any host in development (Tom Dyson)
Expose reusable client-side code to build Draftail extensions (Thibaud Colas)
Added WAGTAILFRONTENDCACHE_LANGUAGES setting to specify the languages whose URLs are to be purged when using i18n_patterns (PyMan Claudio Marinozzi)
Added extra_footer_actions template blocks for customizing the add/edit page views (Arthur Holzner)
Status button on 'edit page' now links to the correct URL when live and draft slug differ (LB (Ben Johnston))
Image title text in the gallery and in the chooser now wraps for long filenames (LB (Ben Johnston), Luiz Boaretto)
Move image editor action buttons to the bottom of the form on mobile (Julian Gallo)
StreamField icons are now correctly sorted into groups on the 'append' menu (Tim Heap)
Draftail now supports features specified via the WAGTAILADMIN_RICH_TEXT_EDITORS setting (Todd Dembrey)
Password reset form no longer indicates whether the email is recognized, as per standard Django behavior (Bertrand Bordage)
UserAttributeSimilarityValidator is now correctly enforced on user creation / editing forms (Tim Heap)
Focal area removal not working in IE11 and MS Edge (Thibaud Colas)
Rewrite password change feedback message to be more user-friendly (Casper Timmers)
Correct dropdown arrow styling in Firefox, IE11 (Janneke Janssen, Alexs Mathilda)
Password reset no indicates specific validation errors on certain password restrictions (Lucas Moeskops)
Confirmation page on page deletion now respects custom get_admin_display_title methods (Kim Chee Leong)
Adding external link with selected text now includes text in link chooser (Tony Yates, Thibaud Colas, Alexs Mathilda)
Editing setting object with no site configured no longer crashes (Harm Zeinstra)
Creating a new object with inlines while mandatory fields are empty no longer crashes (Bertrand Bordage)
Localization of image and apps verbose names
Draftail editor no longer crashes after deleting image/embed using DEL key (Thibaud Colas)
Breadcrumb navigation now respects custom get_admin_display_title methods (Arthur Holzner, Wietze Helmantel, Matt Westcott)
Inconsistent order of heading features when adding h1, h5, or h6 as default feature for Hallo RichText editor (Loic Teixeira)
Add invalid password reset link error message (Coen van der Kamp)
Bypass select/prefetch related optimisation on update_index for ParentalManyToManyField to fix crash (Tim Kamanin)
'Add user' is now rendered as a button due to the use of quotes within translations (Benoît Vogel)
Menu icon no longer overlaps with title in Modeladmin on mobile (Coen van der Kamp)
Background color overflow within the Wagtail documentation (Sergey Fedoseev)
Page count on homepage summary panel now takes account of user permissions (Andy Chosak)
Explorer view now prevents navigating outside of the common ancestor of the user's permissions (Andy Chosak)
Generate URL for the current site when multiple sites share the same root page (Codie Roelf)
Restored ability to use non-model fields with FieldPanel (Matt Westcott, LB (Ben Johnston))
Stop revision comparison view from crashing when non-model FieldPanels are in use (LB (Ben Johnston))
Ordering in the page explorer now respects custom get_admin_display_title methods when sorting <100 pages (Matt Westcott)
Use index-specific Elasticsearch endpoints for bulk insertion, for compatibility with providers that lock down the root endpoint (Karl Hobley)
Fix usage URL on the document edit page (Jérôme Lebleu)
The internal API for rich text image format objects (see rich_text_image_formats) has been updated; the Format.image_to_html method now receives the extra_attributes keyword argument as a dictionary of attributes, rather than a string. If you have defined any custom format objects that override this method, these will need to be updated.
One column per quarter.