Handling of AttributeError is unneeded since support for Django 1.8 is dropped and handling of KeyError is unneeded because both hostname and port are obtained now via Django API (its current implementation can raise KeyError if SERVER_NAME or SERVER_PORT are absent, but they are required per PEP 3333).
Updated tests to include SERVER_NAME / SERVER_PORT when manually constructing HttpRequest objects, and removed tests that explicitly test the absence of these.
1. Remove return from EmptySearchResults.__init__. Init method is
required to return None.
2. Remove useless self-assignment from BaseSearchBackend.
3. Remove useless self-assignment from wagtail.tests.settings.
This change modifies the cleanForSlug function used when creating a
page's slug from its title. The current behavior uses the Django URLify
function, which removes stopwords like "before". If a page title
consists only of such stopwords, the generated slug will be blank, thus
confusingly preventing page save.
This change handles this case by falling back to an alternate slug
generation approach that allows the stopwords to be used.
This does unfortunately introduce some potentially inconsistent
behavior; for example, a page titled "Before me" will be given a slug of
"me" and a page titled "Before" will be given a slug of "before".
(Honestly, the inclusion of "before" as a stopword is somewhat
unexpected.)
Fixes #4881.
* Create a squashed migration for wagtailimages
* Remove unneeded image updates
As this is the initial migration, there won't be any images. Not in
Wagtail's or a customised image model.
* Move RunPython blocks to the end of the migration
They can all be run on the latest schema without changes. This allows
the schema changes to be squashed.
* Simplify migration
* Create new squashed migration for wagtailcore
* Remove unneeded page updates
Since this is the initial migration, there won't be any pages other than
those created at the beginning
* Move RunPython blocks to the bottom of the migration
They can all be run on the latest schema without changes. This allows
the schema changes to be squashed.
* Simplify the migration