# Wagtail 7.0 (LTS) release notes _May 6, 2025_ ```{contents} --- local: depth: 1 --- ``` Wagtail 7.0 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). ## What's new ### Django 5.2 support This version adds formal support for Django 5.2. ### Deferring validation on saving drafts This release introduces a change to the validation behavior when saving pages (or snippets using [`DraftStateMixin`](wagtailsnippets_saving_draft_changes_of_snippets)) as drafts. In most cases, required fields will not be enforced when saving as draft, allowing users to save work-in-progress versions without filling in all fields. Validation is applied as normal when the page or snippet is published, scheduled, or submitted to a workflow. The new behavior is enabled by default, but see the notes below on [](configuring_deferred_validation). This feature was developed by Matt Westcott and Sage Abdullah. ### New and improved pagination We have a new pagination interface for all listing views and most choosers, including page numbers. This simplifies navigation for listings with tens or hundreds of pages, so users can jump directly to the last pages. Thank you to Jordan Teichmann for implementing the new designs, with guidance from Sage Abdullah. ### Locale in listings and choosers This release adds a new "Locale" column to the listings and choosers of translatable models, making it easier to filter and sort by locale. The current content's locale is applied in choosers by default, with the ability to clear the locale filter. This feature was developed by Dan Braghis and Sage Abdullah. ### How-to guide for Django Ninja While Wagtail provides a [built-in API module](api) based on the popular Django REST Framework, it is possible to use other approaches. This release adds a new [](api_ninja) guide, to demonstrate basic usage of Wagtail with [Django Ninja](https://django-ninja.dev/), which leverages type hints and Pydantic for data validation. The guide covers common requirements beyond initial setup, like rich text, image renditions, and generation of API documentation. This documentation was contributed by Thibaud Colas with support from Sage Abdullah. ### Other features * Add `WAGTAIL_` prefix to Wagtail-specific tag settings (Aayushman Singh) * Implement `normalize` on `TypedTableBlock` to assist with setting `default` and `preview_value` (Sage Abdullah) * Apply normalization when modifying a `StreamBlock`'s value to assist with programmatic changes to `StreamField` (Matt Westcott) * Allow a custom image rendition model to define its unique constraint with `models.UniqueConstraint` instead of `unique_together` (Oliver Parker, Cynthia Kiser, Sage Abdullah) * Default to the `standard` tokenizer on Elasticsearch, to correctly handle numbers as tokens (Matt Westcott) * Add color-scheme meta tag to Wagtail admin (Ashish Nagmoti) * Add the ability to set the [default privacy restriction for new pages](set_default_page_privacy) using `get_default_privacy_setting` (Shlomo Markowitz) * Improve performance of batch purging page urls in the frontend cache, avoiding n+1 query issues (Andy Babic) * Add better support and documentation for overriding or extending [icons used in the in the userbar](custom_icons_userbar) (Sébastien Corbin) * List the comments action, if comments are enabled, within the admin keyboard shortcuts dialog (Dhruvi Patel) * Add better support and documentation for [overriding the default field widgets](custom_form_field_type_widgets) used within form pages (Baptiste Mispelon) * Allow workflow tasks to specify a template for the action modal via `get_template_for_action` (Sage Abdullah) * Change 'Publish' button label to 'Schedule to publish' if go-live schedule is set (Sage Abdullah) * Hide add locale button when no more languages are available (Dan Braghis) * Allow customizing `InspectView` field display value via methods on the view (Dan Braghis) * Make rendering of active listing filters extensible, to support additional filter types (Sage Abdullah) ### Bug fixes * Take preferred language into account for translatable strings in client-side code (Bernhard Bliem, Sage Abdullah) * Support translating with the preferred language for rich text formatting labels (Bernhard Bliem, Sage Abdullah) * Make "Actions" label translatable within the rich text toolbar (Bernhard Bliem, Sage Abdullah) * Do not show the content type column as sortable when searching pages (Srishti Jaiswal, Sage Abdullah) * Support simple subqueries for `in` and `exact` lookup on Elasticsearch (Sage Abdullah) * Force preview panel scroll behavior to instant to avoid flickering (Sage Abdullah) * Fix incorrect "Views (past week)" heading on promoted search results listing (Baptiste Mispelon) * Ensure `InlinePanel` will be correctly ordered after the first save when `min_num` is used (Elhussein Almasri, Joel William) * Avoid deprecation warnings about URLField `assume_scheme` on Django 5.x (Sage Abdullah) * Fix setup.cfg syntax for setuptools v78 (Sage Abdullah) * Ensure `ImproperlyConfigured` is thrown from `db_field` on unbound `FieldPanel`s as intended (Matt Westcott) * Refine the positioning of the add comment button next to select, radio, checkbox fields and between field row columns (Srishti Jaiswal) * Show the correct privacy status for child collections of private collections (Shlomo Markowitz) * Ensure reference index correctly handles models with primary keys not named `id` (Sage Abdullah) * On "move page" bulk action, do not prefill the destination with the root page (Stefan Hammer) * Ensure the default preferred language respects the `WAGTAILADMIN_PERMITTED_LANGUAGES` setting (Sébastien Corbin) * Ensure there is consistent padding in homepage panels table headers (Aditya (megatrron)) * Prevent redundant calls to context processors when rendering userbar (Ihor Marhitych) * Fix validation of duplicate field names in form builder when fields have been deleted (Ian Meigh) * Fix font size of footer action buttons when there is only one item (Sage Abdullah) ### Documentation * Add missing `django.contrib.admin` to list of apps in ["add to Django project" guide](../advanced_topics/add_to_django_project) (Mohamed Rabiaa) * Add tutorial on deploying on Ubuntu to [third-party tutorials](../advanced_topics/third_party_tutorials) (Mohammad Fathi Rahman) * Document that `request_or_site` is optional on `BaseGenericSetting.load` (Matt Westcott) * Mention third-party `StreamField` based form builder packages in the [form builder](form_builder) documentation (Matt Westcott) * Clarify that [`insert_editor_js` hook](insert_editor_js) applies to all core editing/creation views (LB (Ben) Johnston) * Clarify requirement for non-page models using model mixins to be registered as snippets (Sage Abdullah) * Document the `page.move` method from django-treebeard (Shlomo Markowitz) * Clarify that `Page.get_url_parts` will return a tuple, not `None` for `NoReverseMatch` errors (Arthur Tripp) * Document the [`expand_db_html` utility function](rich_text_manual_conversion) to create HTML ready for display (Thibaud Colas) * Mention `expand_db_html` usage for rich text in [REST framework API](api_v2_configuration) (Thibaud Colas) * Docs: Further document usage of API `?limit` with `WAGTAILAPI_LIMIT_MAX` (Thibaud Colas) ### Maintenance * Migrate away from deprecated Sass import rules to module system (Srishti Jaiswal) * Apply Sass mixed declarations migration in preparation for CSS nesting (Prabhpreet Kaur) * Refactor styles for Draftail, minimap, and comments to fix remaining Sass migration warnings (Thibaud Colas) * npm package updates; `downshift`, `focus-trap-react`, `immer`, `redux`, `uuid` (LB (Ben) Johnston) * Validate against invalid characters in Lexeme values (Matt Westcott) * Split up `wagtail.models` module into submodules (Matt Westcott) * Update `ruff` to 0.9.6 (Sage Abdullah) * Fix up `stubs` & `adapter` contents to better support Jest testing (LB (Ben) Johnston) * Cleanup Stimulus controller imports, JSDoc & linting (LB (Ben) Johnston) * Rename `SkipLinkController` to `FocusController` with improved reusability, updated unit tests, and added story (LB (Ben) Johnston) * Fix CI testing issues with the Stimulus `LocaleController` time zones & non-deterministic page ordering tests (Sage Abdullah) * Make GitHub highlight `.html` files as Django templates (Jake Howard) * Remove admin JavaScript imports from shared template includes, moving the imports to the appropriate core admin inclusion locations (Sai Srikar Dumpeti) * Remove non-editing view inclusions of the `insert_editor_js` hook output, deprecate the wrapper template tag `_editor_js.html` (Sai Srikar Dumpeti, LB (Ben) Johnston) * Remove upper bound on Django dependency (Matt Westcott) * Add `default_auto_field` setting to home app in project template (Sylvain Boissel) * Migrate setuptools configuration from `setup.py` and `setup.cfg` to `pyproject.toml` (Sage Abdullah) * Refactor `move_choose_destination` to a class-based view (Chiemezuo Akujobi) * Update `django-tasks` to 0.7.x (Jake Howard) ## Upgrade considerations - removal of deprecated features from Wagtail 5.2 - 6.3 Features previously deprecated in Wagtail 5.2, 6.0, 6.1, 6.2 and 6.3 have been fully removed. For additional details on these changes, see: * [Wagtail 5.2 release notes](/releases/5.2) * [Wagtail 6.0 release notes](/releases/6.0) * [Wagtail 6.1 release notes](/releases/6.1) * [Wagtail 6.2 release notes](/releases/6.2) * [Wagtail 6.3 release notes](/releases/6.3) The most significant changes are highlighted below. ### Removal of `classnames` attribute on menu item and image format classes The `classnames` keyword argument on the following classes is no longer supported and should be replaced with `classname`: * `admin.menu.MenuItem` * `admin.ui.sidebar.ActionMenuItem` * `admin.ui.sidebar.LinkMenuItem` * `admin.ui.sidebar.PageExplorerMenuItem` * `contrib.settings.registry.SettingMenuItem` * `wagtail.images.formats.Format` ### Renamed settings * The `WAGTAIL_AUTO_UPDATE_PREVIEW` setting is removed and should be replaced with [`WAGTAIL_AUTO_UPDATE_PREVIEW_INTERVAL = 0`](wagtail_auto_update_preview_interval) to disable auto-update. * The `PASSWORD_REQUIRED_TEMPLATE` setting is no longer recognized and should be replaced with [`WAGTAIL_PASSWORD_REQUIRED_TEMPLATE`](frontend_authentication). * The `DOCUMENT_PASSWORD_REQUIRED_TEMPLATE` setting is no longer recognized and should be replaced with [`WAGTAILDOCS_PASSWORD_REQUIRED_TEMPLATE`](frontend_authentication). ### Replaced mechanism for customizing user form classes The settings `WAGTAIL_USER_EDIT_FORM`, `WAGTAIL_USER_CREATION_FORM` and `WAGTAIL_USER_CUSTOM_FIELDS` have been removed in favor of customizing the form classes via [`UserViewSet.get_form_class()`](custom_userviewset). ### Updates to button rendering hooks * The hooks [`register_page_header_buttons`](register_page_header_buttons), [`register_page_listing_buttons`](register_page_listing_buttons), [`construct_page_listing_buttons`](construct_page_listing_buttons) and [`register_page_listing_more_buttons`](register_page_listing_more_buttons) now receive a `user` argument instead of `page_perms`. * The [`register_page_header_buttons`](register_page_header_buttons) receives a fourth argument `view_name`. * The [`construct_snippet_listing_buttons`](construct_snippet_listing_buttons) hook no longer accepts a `context` argument. * The [`register_user_listing_buttons`](register_user_listing_buttons) hook now accepts a `request_user` argument instead of `context`. ### Other removals * The `get_template` method on StreamField blocks now accepts a `value` argument as its first argument. * Passing a dict as `DISTRIBUTION_ID` within the `WAGTAILFRONTENDCACHE` configuration setting is no longer supported, and should be replaced by [multiple backends](frontendcache_multiple_backends) with a `HOSTNAMES` parameter. * `ModelViewSet` no longer provides the URL patterns `/` and `/delete/` for editing and deleting; these have been replaced by `edit//` and `delete//`. * The undocumented usage of the JavaScript `window.chooserUrls` within Draftail choosers is removed. * The undocumented `coreutils.escape_script` function and `escapescript` template tag, and handling of `