Skip to content

Commit

Permalink
*: support config debug in env
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Oct 7, 2023
1 parent 258ece2 commit 04d1ce3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions configs/default/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 0 additions & 2 deletions configs/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 0 additions & 1 deletion configs/production.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
DEBUG = False

0 comments on commit 04d1ce3

Please sign in to comment.