From 9ca658038ee1511dcd0287190685e5ea5fc2a8d9 Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 10 May 2024 02:26:33 +0200 Subject: [PATCH] refactor(settings.py): organize apps into 3 categories --- shiftregister/settings.py | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/shiftregister/settings.py b/shiftregister/settings.py index 49fae62..3a15a88 100644 --- a/shiftregister/settings.py +++ b/shiftregister/settings.py @@ -46,27 +46,36 @@ ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=[]) # Application definition -INSTALLED_APPS = [ - "dynamic_preferences", - "shiftregister.app", - "shiftregister.core", - "shiftregister.fallback", - "shiftregister.importer", - "shiftregister.metrics", - "shiftregister.pages", - "shiftregister.signage", - "shiftregister.team", - "shiftregister.feedback", +DJANGO_APPS = [ "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.humanize", - "django.contrib.sessions", "django.contrib.messages", + "django.contrib.sessions", "django.contrib.staticfiles", +] + +THIRDPARTY_APPS = [ + "dynamic_preferences", "phonenumber_field", ] +LOCAL_APPS = [ + "shiftregister.app", + "shiftregister.core", + "shiftregister.fallback", + "shiftregister.feedback", + "shiftregister.importer", + "shiftregister.messaging", + "shiftregister.metrics", + "shiftregister.pages", + "shiftregister.signage", + "shiftregister.team", +] + +INSTALLED_APPS = DJANGO_APPS + THIRDPARTY_APPS + LOCAL_APPS + MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware",