[layerindex-web][PATCH 13/15] settings: set DEFAULT_AUTO_FIELD


Tim Orling
 

New in Django 3.2

To quiet warnings, set DEFAULT_AUTO_FIELD to the
default value 'django.db.models.AutoField'

NOTE: The default value for newly created Django 3.2
projects is django.db.models.BigAutoField, but
this causes the need for a migration in 'captcha'.

Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
---
docker/settings.py | 3 +++
settings.py | 3 +++
2 files changed, 6 insertions(+)

diff --git a/docker/settings.py b/docker/settings.py
index 894974f..a3f007d 100644
--- a/docker/settings.py
+++ b/docker/settings.py
@@ -140,6 +140,9 @@ TEMPLATES = [
},
]

+# New in Django 3.2
+DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
+
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
diff --git a/settings.py b/settings.py
index d03d15c..a69eb53 100644
--- a/settings.py
+++ b/settings.py
@@ -140,6 +140,9 @@ TEMPLATES = [
},
]

+# New in Django 3.2
+DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
+
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
--
2.32.0

Join yocto@lists.yoctoproject.org to automatically receive all group messages.