.. contents::
:local:
:depth: 1
Here are other changes related to the redesign:
The panel types StreamFieldPanel
, RichTextFieldPanel
, ImageChooserPanel
, DocumentChooserPanel
and SnippetChooserPanel
have been phased out, and can now be replaced with FieldPanel
. Additionally, PageChooserPanel
is only required when passing a page_type
or can_choose_root
, and can otherwise be replaced with FieldPanel
. In all cases, FieldPanel
will now automatically select the most appropriate form element. This feature was developed by Matt Westcott.
content_json
TextField
with content
JSONField
in PageRevision
(Sage Abdullah)replace_text
management command (Sage Abdullah)data_json
TextField
with data
JSONField
in BaseLogEntry
(Sage Abdullah)simple_translations
ensure that the user is redirected to the page edit view when submitting for a single locale (Mitchel Cabuloy)Form
pages, ensure that all added fields are correctly shown in the preview (Joshua Munn)WAGTAILDOCS_CONTENT_TYPES
& WAGTAILDOCS_INLINE_CONTENT_TYPES
ensure that the filename is correctly set in the Content-Disposition
header so that saving the files will use the correct filename (John-Scott Atlakson)IE mode <https://docs.microsoft.com/en-us/deployedge/edge-ie-mode>
_ to keep access to IE11-only sites, while other sites and apps like Wagtail can leverage modern browser capabilities.content_json
TextField
with content
JSONField
in PageRevision
content_json
field in the PageRevision
model has been renamed to content
.JSONField
instead of TextField
.PageRevision
objects, running the migrations might take a while.data_json
TextField
with data
JSONField
in BaseLogEntry
data_json
field in the BaseLogEntry
model has been renamed to data
.JSONField
instead of TextField
.""
to {}
.BaseLogEntry
subclasses, i.e. PageLogEntry
and ModelLogEntry
.window.registerHalloPlugin
will no longer be created on the page editor load, unless the legacy package is installed.As of this release, the use of special-purpose field panel types such as StreamFieldPanel
and ImageChooserPanel
is being phased out, and developers will generally expect to be able to use a plain FieldPanel
instead. For this reason, developers of third-party packages implementing their own field panel types are recommended to follow suit and ensure that their code also works with FieldPanel
. The steps for doing this will depend on the package's functionality, but in general:
Widget
class that produces your desired HTML rendering.widget_overrides
method, your code should instead call register_form_field_override
so that the desired widget is always selected for the relevant model field type.get_comparison_class
method, your code should instead call wagtail.admin.compare.register_comparison_class
to register the comparison class against the relevant model field type.If you do continue to use a custom panel class, note that the template context for panels derived from BaseChooserPanel
has changed - the context variable is_chosen
, and the variable name given by the panel's object_type_name
property, are no longer available on the template. The only available variables are now field
and show_add_comment_button
. If your template depends on these additional variables, you will need to pass them explicitly by overriding the render_as_field
method.