From a0223089650e931d06d0af9218231efa4023c170 Mon Sep 17 00:00:00 2001 From: "nick.moreton" Date: Fri, 18 Nov 2022 13:06:00 +0000 Subject: [PATCH] Silence warnings about DEFAULT_AUTO_FIELD Follows the django 3.2 upgrade recommendations At this stage Wagtail 2.16 and django 3.2 is installed. --- sandbox/sandbox/settings.py | 2 ++ setup.py | 14 +++++++++++--- src/wagtail_personalisation/config.py | 1 + 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sandbox/sandbox/settings.py b/sandbox/sandbox/settings.py index 1a1b3fa..0656566 100644 --- a/sandbox/sandbox/settings.py +++ b/sandbox/sandbox/settings.py @@ -166,3 +166,5 @@ BASE_URL = 'http://example.com' INTERNAL_IPS = ['127.0.0.1'] + +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' diff --git a/setup.py b/setup.py index c92e562..e8f67fb 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ import re from setuptools import find_packages, setup install_requires = [ - 'wagtail>=2.0', + 'wagtail>=2.15,<3.0', 'user-agents>=1.1.0', 'wagtailfontawesome>=1.1.3', 'pycountry', @@ -58,9 +58,17 @@ setup( 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Framework :: Django', - 'Framework :: Django :: 2.0', + 'Framework :: Django :: 3', + 'Framework :: Django :: 4', + 'Framework :: Wagtail', + 'Framework :: Wagtail :: 3', + 'Framework :: Wagtail :: 4', 'Topic :: Internet :: WWW/HTTP :: Site Management', ], ) diff --git a/src/wagtail_personalisation/config.py b/src/wagtail_personalisation/config.py index baf1d07..12a9229 100644 --- a/src/wagtail_personalisation/config.py +++ b/src/wagtail_personalisation/config.py @@ -6,6 +6,7 @@ class WagtailPersonalisationConfig(AppConfig): label = 'wagtail_personalisation' name = 'wagtail_personalisation' verbose_name = _('Wagtail Personalisation') + default_auto_field = 'django.db.models.AutoField' def ready(self): from wagtail_personalisation import receivers