[settings] Make it more complicated, why not
This commit is contained in:
parent
f3bdb36ca8
commit
1d44ea830e
1 changed files with 10 additions and 2 deletions
|
@ -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"]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue