diff --git a/src/dx/settings.py b/src/dx/settings.py index 2ff9590..bbdd462 100644 --- a/src/dx/settings.py +++ b/src/dx/settings.py @@ -4,6 +4,15 @@ from configurations import Configuration BASE_DIR = Path(__file__).resolve().parent.parent +class EnableDebug(Configuration): + """ + Intended as a MIXIN + """ + + DEBUG = True + INSTALLED_APPS = Configuration.INSTALLED_APPS + ["django_debug_toolbar"] + + class Base(Configuration): DEBUG = False DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" @@ -22,7 +31,7 @@ class Base(Configuration): USE_TZ = True -class Dev(Base): +class Dev(EnableDebug, Base): # Dangerous: disable host header validation ALLOWED_HOSTS = ["*"] DATABASES = { @@ -31,7 +40,6 @@ class Dev(Base): "NAME": "db.sqlite3", }, } - DEBUG = True INSTALLED_APPS = Base.INSTALLED_APPS + ["django_extensions"]