This means that pages, images, documents and snippets will use the approprate chooser widget automatically without having to specify it explicitly in the form definition or use a *ChooserPanel in the edit handler.
Removing the test is justified as this isn't a public-facing method; it's just a helper to get the object data onto the template, and the test_render_as_field test already confirms that's working correctly.
All built-in choosers use the standard field_panel_field.html template - it's probably been this way since Wagtail 1.0, when choosers got their own Widget classes rather than just being HTML decoration around a HiddenInput. As a result, the additional template context they pass (e.g. self.object_type_name) is redundant. If any third-party chooser panels exist that do need them (which is unlikely, if they just copy the existing ones), they should override render_as_field themselves to pass whatever context they need.
The `url` key is meant for the latest release (2.16.1). The `minorUrl` key is for the latest "minor" release (2.16).
PR #7652 adds the functionality to show the appropriate link in the upgrade notification based on the difference between the currently used and the latest version.
Fixes a test failure against Django main.
In #2552, a fix was applied to ensure that the project-level MESSAGE_TAGS setting was ignored, allowing end-users to customise that setting for their own projects without it leaking into Wagtail admin styles.
Unfortunately, the test was flawed (or was broken in a Django regression at some point): in Django <=4.0, MESSAGE_TAGS was not affected by override_settings after the first request, which meant that unless the test was run in isolation, the custom classname that was supposed to flag up the problem never got applied, and the test always succeeded.
The change to SVG icons broke the intent of #2552, since it used message.level_tag for the icon's classname (and this picks up MESSAGE_TAGS customisations), but due to the broken test this went unnoticed.
24b316536a fixed the override_settings behaviour, making the test fail as it should have done long ago.
Here we adjust the test to not rely on override_settings (so that it does what it's supposed to do on all Django versions), fix a test that gets broken as a side effect (because it's unnecessarily checking message.level_tag), and fixes our SVG-icon-powered message include to bypass the MESSAGE_TAGS setting like the old implementation did.
Confusing? Yes.
fixes #6555,
Only the final unsaved FormField appears in the preview of a FormPage. As
FormBuilder adds fields to its formfields attribute using their
clean_name as the key, and FormField.clean_name isn't populated until
FormField.save is called, all unsaved fields are added to the
FormBuilder.formfields dict with the empty string as key. This solves
this by calling get_field_clean_name on the field before insertion
into formfields if clean_name hasn't been set yet.
* Delete a dead return-statement in SafePaginateListView.paginate_queryset.
* Use try/except/finally instead.
PyCharm marks page as "might be referenced before assignment", though,
but I guess it's a bit pedantic.