From b455c659b716762e0fddf0d13e63a699d29d16bb Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Thu, 8 Apr 2021 18:16:16 +0100 Subject: [PATCH] Add default_auto_field to appconfigs to silence warnings --- wagtail/admin/apps.py | 1 + wagtail/contrib/forms/apps.py | 1 + wagtail/contrib/redirects/apps.py | 1 + wagtail/contrib/search_promotions/apps.py | 1 + wagtail/core/apps.py | 1 + wagtail/documents/apps.py | 1 + wagtail/embeds/apps.py | 1 + wagtail/images/apps.py | 1 + wagtail/search/apps.py | 1 + wagtail/tests/demosite/__init__.py | 1 + wagtail/tests/demosite/apps.py | 6 ++++++ wagtail/tests/i18n/__init__.py | 1 + wagtail/tests/i18n/apps.py | 6 ++++++ wagtail/tests/modeladmintest/apps.py | 1 + wagtail/tests/search/apps.py | 1 + wagtail/tests/snippets/apps.py | 1 + wagtail/tests/testapp/apps.py | 1 + wagtail/users/apps.py | 1 + 18 files changed, 28 insertions(+) create mode 100644 wagtail/tests/demosite/apps.py create mode 100644 wagtail/tests/i18n/apps.py diff --git a/wagtail/admin/apps.py b/wagtail/admin/apps.py index 2732f8e6e7..e89deaa602 100644 --- a/wagtail/admin/apps.py +++ b/wagtail/admin/apps.py @@ -8,6 +8,7 @@ class WagtailAdminAppConfig(AppConfig): name = 'wagtail.admin' label = 'wagtailadmin' verbose_name = _("Wagtail admin") + default_auto_field = 'django.db.models.AutoField' def ready(self): from wagtail.admin.signal_handlers import register_signal_handlers diff --git a/wagtail/contrib/forms/apps.py b/wagtail/contrib/forms/apps.py index df5cad6f86..78bdcf3859 100644 --- a/wagtail/contrib/forms/apps.py +++ b/wagtail/contrib/forms/apps.py @@ -6,3 +6,4 @@ class WagtailFormsAppConfig(AppConfig): name = 'wagtail.contrib.forms' label = 'wagtailforms' verbose_name = _("Wagtail forms") + default_auto_field = 'django.db.models.AutoField' diff --git a/wagtail/contrib/redirects/apps.py b/wagtail/contrib/redirects/apps.py index 9f0e55cfdf..d8e8080a54 100644 --- a/wagtail/contrib/redirects/apps.py +++ b/wagtail/contrib/redirects/apps.py @@ -6,3 +6,4 @@ class WagtailRedirectsAppConfig(AppConfig): name = 'wagtail.contrib.redirects' label = 'wagtailredirects' verbose_name = _("Wagtail redirects") + default_auto_field = 'django.db.models.AutoField' diff --git a/wagtail/contrib/search_promotions/apps.py b/wagtail/contrib/search_promotions/apps.py index 32daca5588..78f8cdca1c 100644 --- a/wagtail/contrib/search_promotions/apps.py +++ b/wagtail/contrib/search_promotions/apps.py @@ -6,3 +6,4 @@ class WagtailSearchPromotionsAppConfig(AppConfig): name = 'wagtail.contrib.search_promotions' label = 'wagtailsearchpromotions' verbose_name = _("Wagtail search promotions") + default_auto_field = 'django.db.models.AutoField' diff --git a/wagtail/core/apps.py b/wagtail/core/apps.py index b9321c652d..72bc59c30a 100644 --- a/wagtail/core/apps.py +++ b/wagtail/core/apps.py @@ -6,6 +6,7 @@ class WagtailCoreAppConfig(AppConfig): name = 'wagtail.core' label = 'wagtailcore' verbose_name = _("Wagtail core") + default_auto_field = 'django.db.models.AutoField' def ready(self): from wagtail.core.signal_handlers import register_signal_handlers diff --git a/wagtail/documents/apps.py b/wagtail/documents/apps.py index 0b2532da4e..a9b7a961b6 100644 --- a/wagtail/documents/apps.py +++ b/wagtail/documents/apps.py @@ -6,6 +6,7 @@ class WagtailDocsAppConfig(AppConfig): name = 'wagtail.documents' label = 'wagtaildocs' verbose_name = _("Wagtail documents") + default_auto_field = 'django.db.models.AutoField' def ready(self): from wagtail.documents.signal_handlers import register_signal_handlers diff --git a/wagtail/embeds/apps.py b/wagtail/embeds/apps.py index 51f0fd584e..eb70b28bce 100644 --- a/wagtail/embeds/apps.py +++ b/wagtail/embeds/apps.py @@ -8,6 +8,7 @@ class WagtailEmbedsAppConfig(AppConfig): name = 'wagtail.embeds' label = 'wagtailembeds' verbose_name = _("Wagtail embeds") + default_auto_field = 'django.db.models.AutoField' def ready(self): # Check configuration on startup diff --git a/wagtail/images/apps.py b/wagtail/images/apps.py index f17cb248fe..bbfe0a3ed2 100644 --- a/wagtail/images/apps.py +++ b/wagtail/images/apps.py @@ -8,6 +8,7 @@ class WagtailImagesAppConfig(AppConfig): name = 'wagtail.images' label = 'wagtailimages' verbose_name = _("Wagtail images") + default_auto_field = 'django.db.models.AutoField' def ready(self): from wagtail.images.signal_handlers import register_signal_handlers diff --git a/wagtail/search/apps.py b/wagtail/search/apps.py index 9a5fc2488e..547f3aee20 100644 --- a/wagtail/search/apps.py +++ b/wagtail/search/apps.py @@ -8,6 +8,7 @@ class WagtailSearchAppConfig(AppConfig): name = 'wagtail.search' label = 'wagtailsearch' verbose_name = _("Wagtail search") + default_auto_field = 'django.db.models.AutoField' def ready(self): register_signal_handlers() diff --git a/wagtail/tests/demosite/__init__.py b/wagtail/tests/demosite/__init__.py index e69de29bb2..7695f2c8ea 100644 --- a/wagtail/tests/demosite/__init__.py +++ b/wagtail/tests/demosite/__init__.py @@ -0,0 +1 @@ +default_app_config = 'wagtail.tests.demosite.apps.DemositeAppConfig' diff --git a/wagtail/tests/demosite/apps.py b/wagtail/tests/demosite/apps.py new file mode 100644 index 0000000000..350ebce657 --- /dev/null +++ b/wagtail/tests/demosite/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class DemositeAppConfig(AppConfig): + default_auto_field = 'django.db.models.AutoField' + name = 'wagtail.tests.demosite' diff --git a/wagtail/tests/i18n/__init__.py b/wagtail/tests/i18n/__init__.py index e69de29bb2..af65a0eed7 100644 --- a/wagtail/tests/i18n/__init__.py +++ b/wagtail/tests/i18n/__init__.py @@ -0,0 +1 @@ +default_app_config = 'wagtail.tests.i18n.apps.I18nAppConfig' diff --git a/wagtail/tests/i18n/apps.py b/wagtail/tests/i18n/apps.py new file mode 100644 index 0000000000..34b4352632 --- /dev/null +++ b/wagtail/tests/i18n/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class I18nAppConfig(AppConfig): + default_auto_field = 'django.db.models.AutoField' + name = 'wagtail.tests.i18n' diff --git a/wagtail/tests/modeladmintest/apps.py b/wagtail/tests/modeladmintest/apps.py index 947d5020ab..55d1b8df9c 100644 --- a/wagtail/tests/modeladmintest/apps.py +++ b/wagtail/tests/modeladmintest/apps.py @@ -3,6 +3,7 @@ from django.utils.translation import gettext_lazy as _ class WagtailTestsAppConfig(AppConfig): + default_auto_field = 'django.db.models.AutoField' name = 'wagtail.tests.modeladmintest' label = 'modeladmintest' verbose_name = _("Test Wagtail Model Admin") diff --git a/wagtail/tests/search/apps.py b/wagtail/tests/search/apps.py index 753b7d5b96..7f285196cf 100644 --- a/wagtail/tests/search/apps.py +++ b/wagtail/tests/search/apps.py @@ -3,6 +3,7 @@ from django.utils.translation import gettext_lazy as _ class WagtailSearchTestsAppConfig(AppConfig): + default_auto_field = 'django.db.models.AutoField' name = 'wagtail.tests.search' label = 'searchtests' verbose_name = _("Wagtail search tests") diff --git a/wagtail/tests/snippets/apps.py b/wagtail/tests/snippets/apps.py index 8827076db4..978f2c4256 100644 --- a/wagtail/tests/snippets/apps.py +++ b/wagtail/tests/snippets/apps.py @@ -3,6 +3,7 @@ from django.utils.translation import gettext_lazy as _ class WagtailSnippetsTestsAppConfig(AppConfig): + default_auto_field = 'django.db.models.AutoField' name = 'wagtail.tests.snippets' label = 'snippetstests' verbose_name = _("Wagtail snippets tests") diff --git a/wagtail/tests/testapp/apps.py b/wagtail/tests/testapp/apps.py index 0a4b774b01..3f3d9b41f1 100644 --- a/wagtail/tests/testapp/apps.py +++ b/wagtail/tests/testapp/apps.py @@ -3,6 +3,7 @@ from django.utils.translation import gettext_lazy as _ class WagtailTestsAppConfig(AppConfig): + default_auto_field = 'django.db.models.AutoField' name = 'wagtail.tests.testapp' label = 'tests' verbose_name = _("Wagtail tests") diff --git a/wagtail/users/apps.py b/wagtail/users/apps.py index 1d09daf170..d6afcc5ad0 100644 --- a/wagtail/users/apps.py +++ b/wagtail/users/apps.py @@ -6,3 +6,4 @@ class WagtailUsersAppConfig(AppConfig): name = 'wagtail.users' label = 'wagtailusers' verbose_name = _("Wagtail users") + default_auto_field = 'django.db.models.AutoField'