From 5ddc374b6cbe08a8b14a6b30eec84fa319b333e3 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Fri, 25 Mar 2022 14:31:33 -0400 Subject: [PATCH] Release notes for #8191 and #8011 --- docs/releases/2.17.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/releases/2.17.md b/docs/releases/2.17.md index 914121de62..55a0fac0fc 100644 --- a/docs/releases/2.17.md +++ b/docs/releases/2.17.md @@ -72,6 +72,24 @@ The panel types `StreamFieldPanel`, `RichTextFieldPanel`, `ImageChooserPanel`, ` ## Upgrade considerations +### Changes to module paths + +Various modules of Wagtail have been reorganised, and imports should be updated as follows: + +* All modules under `wagtail.core` can now be found under `wagtail` - for example, `from wagtail.core.models import Page` should be changed to `from wagtail.models import Page` +* The `wagtail.tests` module is renamed to `wagtail.test` +* `wagtail.admin.edit_handlers` is renamed to `wagtail.admin.panels` +* `wagtail.contrib.forms.edit_handlers` is renamed to `wagtail.contrib.forms.panels` + +These changes can be applied automatically to your project codebase by running the following commands from the project root: + +```console +wagtail updatemodulepaths --list # list the files to be changed without updating them +wagtail updatemodulepaths --diff # show the changes to be made, without updating files +wagtail updatemodulepaths # actually update the files +``` + + ### Removed warning in Internet Explorer (IE11) * IE11 support was officially dropped in Wagtail 2.15, as of this release there will no longer be a warning shown to users of this browser. @@ -116,3 +134,7 @@ When overriding the `get_form_class` method of a ModelAdmin `CreateView` or `Edi - The `size` argument was used to add a `length` parameter to the HTTP header. - This was never part of the HTTP/1.0 and HTTP/1.1 specifications see [RFC7232](https://httpwg.org/specs/rfc7232.html#header.if-modified-since) and existed only as a an unofficial implementation in IE browsers. + +### Base EditHandler classes renamed + +The base `wagtail.admin.edit_handlers.EditHandler` class can now be found at `wagtail.admin.panels.Panel`, and `wagtail.admin.edit_handlers.BaseCompositeEditHandler` can now be found at `wagtail.admin.panels.PanelGroup`. Additionally, templates previously located under `wagtailadmin/edit_handlers/` can now be found at `wagtailadmin/panels/`, and `wagtailforms/edit_handlers/form_responses_panel.html` is now at `wagtailforms/panels/form_responses_pane.html`.