diff --git a/configs/default/common.py b/configs/default/common.py index 7364116d51..cc1d129ba9 100644 --- a/configs/default/common.py +++ b/configs/default/common.py @@ -93,3 +93,6 @@ # 用户模型设置: AUTH_USER_MODEL = "sspanel.User" DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" + +# set debug in env +DEBUG = os.getenv("DEBUG", "True") == "True" diff --git a/configs/development.py b/configs/development.py index 533d2acce0..015ed1d035 100644 --- a/configs/development.py +++ b/configs/development.py @@ -2,8 +2,6 @@ from configs.default import * # noqa -DEBUG = True - # NOTE for django debug toolbar INTERNAL_IPS = os.getenv("DEBUG_INTERNAL_IPS", "127.0.0.1,0.0.0.0").split(",") INSTALLED_APPS.insert(INSTALLED_APPS.index("django_prometheus"), "debug_toolbar") diff --git a/configs/production.py b/configs/production.py index c7d5d429d6..e69de29bb2 100644 --- a/configs/production.py +++ b/configs/production.py @@ -1 +0,0 @@ -DEBUG = False