settings: Set Django auto field type explicitly

This is already the default (Django 3.2), however, setting it explicitly seems
to avoid a warning while running 'django-admin makemigrations'.

Tests:

- Add SECRET_KEY to settings.py temporarily. Run the command 'django-admin
makemigrations --pythonpath=. --settings=plinth.settings'. There should no
warnings related DEFAULT_AUTO_FIELD not being set.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2021-09-16 17:21:47 -07:00 committed by James Valleroy
parent 613d3a856f
commit 05565b1c60
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -78,6 +78,10 @@ DATABASES = {
# Overridden based on command line argument --develop
DEBUG = False
# This is already the default (Django 3.2), however, setting it explicitly
# seems to avoid a warning while running 'django-admin makemigrations'.
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
# Overridden based on the configuration key server_dir
FORCE_SCRIPT_NAME = '/plinth'