Fix missing locale in the project template's homepage migration

pull/6622/head
Dan Braghis 2020-11-18 10:25:28 +00:00 zatwierdzone przez Matt Westcott
rodzic 2dfb82406a
commit 0da2ba69bc
2 zmienionych plików z 47 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,43 @@
============================
Wagtail 2.11.3 release notes
============================
.. contents::
:local:
:depth: 1
What's new
==========
Bug fixes
~~~~~~~~~
*
Upgrade considerations
======================
If you have used the Wagtail project template, or have migrations that create page instances programmatically, you will
need to add ``run_before = [('wagtailcore', '0053_locale_model')]`` to the corresponding ``Migration`` class.
For example, ``0002_create_homepage.py`` (from the project template):
.. code-block:: python
# ...
class Migration(migrations.Migration):
run_before = [
('wagtailcore', '0053_locale_model'), # added for Wagtail 2.11 compatibility
]
dependencies = [
('home', '0001_initial'),
]
operations = [
migrations.RunPython(create_homepage, remove_homepage),
]

Wyświetl plik

@ -49,6 +49,10 @@ def remove_homepage(apps, schema_editor):
class Migration(migrations.Migration):
run_before = [
('wagtailcore', '0053_locale_model'),
]
dependencies = [
('home', '0001_initial'),
]