If the developer had overridden MESSAGE_TAGS in their site, Wagtail
messages used these classes in the admin. This caused the messages to
lose their styles.
Wagtail now ignores the MESSAGE_TAGS setting, using the default classes
defined in `django.contrib.messages.constants.LEVEL_TAGS`.
Fixes#2551
Conflicts:
wagtail/tests/testapp/urls.py
wagtail/wagtailadmin/templatetags/wagtailadmin_tags.py
Make collection field on document chooser upload respect user permissions
failing test for #2511 for image uploader
Make collection field on image chooser upload respect user permissions
Using ContentTypes can lead to the awkward case where they are used
before the database is migrated, leading to errors on start up. Removing
ContentTypes and using plain Model classes instead makes this
impossible, and also makes the code clearer.
Fixes#2433
Some code was using methods from Wagtail, even though those methods were
deprecated with alternatives provided. Those alternatives are now used
instead.
Forms for Page classes must subclass WagtailAdminPageForm. If they do
not, an error will be thrown for invalid arguments when the Page editor
is opened.
Partial fix for #2267.
Unless overridden by passing `base_form_class=CustomFormClass` to an
EditHandler, the EditHandler now gets the base form class from the
model. People who override the EditHandler of a model no longer have to
also override the base_form_class if the model needs a custom one.
Fixes#2267
Fixes#2369
The static() function was being called during app load which caused a crash when the user is using STATICFILES_STORAGE=ManifestStaticFilesStorage, DEBUG=False and haven't yet collected static files.
I've moved it into a property and it's now only called when a view is being rendered. This also is more consistent because we usually set media using properties (and so does Django admin).