From 96748da99d410940b6241fb39f0009287dfe9132 Mon Sep 17 00:00:00 2001 From: china_ahhui Date: Mon, 13 Nov 2023 18:27:10 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E7=9A=84app=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/application/settings.py | 4 ++-- backend/conf/env.example.py | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/application/settings.py b/backend/application/settings.py index f59140f..39ca001 100644 --- a/backend/application/settings.py +++ b/backend/application/settings.py @@ -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 = [ diff --git a/backend/conf/env.example.py b/backend/conf/env.example.py index 1e0a039..ffc6afa 100644 --- a/backend/conf/env.example.py +++ b/backend/conf/env.example.py @@ -44,6 +44,4 @@ LOGIN_NO_CAPTCHA_AUTH = True # ================================================= # ALLOWED_HOSTS = ["*"] -CUSTOM_APPS = [ - "dvadmin.system", -] +CUSTOM_APPS = []