refactor: 优化配置文件的app配置

This commit is contained in:
china_ahhui
2023-11-13 18:27:10 +08:00
parent b74a196c94
commit 96748da99d
2 changed files with 3 additions and 5 deletions

View File

@@ -46,7 +46,7 @@ ALLOWED_HOSTS = locals().get("ALLOWED_HOSTS", ["*"])
# Application definition
CUSTOM_APPS = [
"dvadmin.system",
]
] + CUSTOM_APPS
INSTALLED_APPS = [
"django.contrib.auth",
@@ -61,7 +61,7 @@ INSTALLED_APPS = [
"drf_yasg",
"captcha",
'channels',
*locals().get("CUSTOM_APPS", []), # 所有项目里写的app需要在env.py文件里的CUSTOM_APPS中
*CUSTOM_APPS,
]
MIDDLEWARE = [