功能变化: 插件注册优化

pull/57/head
李强 2022-05-15 15:46:30 +08:00
parent ffa5c8ec60
commit 2c6cbe2bfb
2 changed files with 16 additions and 1 deletions

View File

@ -365,3 +365,17 @@ TABLE_PREFIX = locals().get('TABLE_PREFIX', "")
SYSTEM_CONFIG = {}
# 字典配置
DICTIONARY_CONFIG = {}
# ================================================= #
# ******************** 插件配置 ******************** #
# ================================================= #
# 租户共享app
TENANT_SHARED_APPS = []
# 插件 urlpatterns
PLUGINS_URL_PATTERNS = []
# ********** 一键导入插件配置开始 **********
# 例如:
# from dvadmin_upgrade_center.settings import * # 升级中心
# from dvadmin_celery.settings import * # celery 异步任务
# ********** 一键导入插件配置结束 **********

View File

@ -22,8 +22,8 @@ from rest_framework_simplejwt.views import (
TokenRefreshView,
)
from application import settings
from application import dispatch
from application import settings
from dvadmin.system.views.dictionary import InitDictionaryViewSet
from dvadmin.system.views.login import (
LoginView,
@ -84,4 +84,5 @@ urlpatterns = (
]
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
+ static(settings.STATIC_URL, document_root=settings.STATIC_URL)
+ [re_path(ele.get('re_path'), include(ele.get('include'))) for ele in settings.PLUGINS_URL_PATTERNS]
)