From 33a1cd354b12e3d864d0d780a9c5f3b72f0a8587 Mon Sep 17 00:00:00 2001 From: KimigaiiWuyi <444835641@qq.com> Date: Tue, 11 Mar 2025 07:42:24 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E5=B0=86=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=B7=BB=E5=8A=A0=E8=87=B3=E7=BD=91=E9=A1=B5?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gsuid_core/webconsole/mount_app.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/gsuid_core/webconsole/mount_app.py b/gsuid_core/webconsole/mount_app.py index 1a4258b..1f95c4d 100644 --- a/gsuid_core/webconsole/mount_app.py +++ b/gsuid_core/webconsole/mount_app.py @@ -50,9 +50,15 @@ from gsuid_core.webconsole.create_config_panel import get_config_page from gsuid_core.utils.plugins_config.gs_config import core_plugins_config from gsuid_core.webconsole.create_analysis_panel import get_analysis_page from gsuid_core.webconsole.create_history_log import get_history_logs_page -from gsuid_core.utils.database.models import GsBind, GsPush, GsUser, GsCache from gsuid_core.webconsole.create_batch_push_panel import get_batch_push_panel from gsuid_core.webconsole.create_core_config_panel import get_core_config_page +from gsuid_core.utils.database.models import ( + GsBind, + GsPush, + GsUser, + GsCache, + Subscribe, +) from gsuid_core.webconsole.login_page import ( # noqa # 不要删 AuthRouter, amis_admin, @@ -339,7 +345,7 @@ class GsAdminPage(admin.PageAdmin): @site.register_admin -class CKadmin(GsAdminModel): +class CKAdmin(GsAdminModel): pk_name = 'id' page_schema = PageSchema(label='CK管理', icon='fa fa-database') # type: ignore @@ -348,7 +354,7 @@ class CKadmin(GsAdminModel): @site.register_admin -class pushadmin(GsAdminModel): +class PushAdmin(GsAdminModel): pk_name = 'id' page_schema = PageSchema(label='推送管理', icon='fa fa-bullhorn') # type: ignore @@ -357,7 +363,7 @@ class pushadmin(GsAdminModel): @site.register_admin -class cacheadmin(GsAdminModel): +class CacheAdmin(GsAdminModel): pk_name = 'id' page_schema = PageSchema(label='缓存管理', icon='fa fa-recycle') # type: ignore @@ -366,7 +372,7 @@ class cacheadmin(GsAdminModel): @site.register_admin -class bindadmin(GsAdminModel): +class BindAdmin(GsAdminModel): pk_name = 'id' page_schema = PageSchema(label='绑定管理', icon='fa fa-users') # type: ignore @@ -374,6 +380,15 @@ class bindadmin(GsAdminModel): model = GsBind +@site.register_admin +class SubscribeAdmin(GsAdminModel): + pk_name = 'id' + page_schema = PageSchema(label='订阅管理', icon='fa fa-rss') # type: ignore + + # 配置管理模型 + model = Subscribe + + # 注册自定义首页 @site.register_admin class MyHomeAdmin(admin.HomeAdmin):