From 36f545fe7a1fd639c4b61121894d2c6e6da808e1 Mon Sep 17 00:00:00 2001 From: wyyalt Date: Mon, 15 Jan 2024 12:00:10 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=20=E9=80=9A=E7=9F=A5=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E6=8E=A5=E5=85=A5=20(closed=20#2059)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/default.py | 2 ++ requirements.txt | 5 ++++- urls.py | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config/default.py b/config/default.py index 408ebd8e6..40aeca9f6 100644 --- a/config/default.py +++ b/config/default.py @@ -81,6 +81,8 @@ "blueapps.opentelemetry.instrument_app", # apigw "apigw_manager.apigw", + # bk-notice + "bk_notice_sdk", ) # 这里是默认的中间件,大部分情况下,不需要改动 diff --git a/requirements.txt b/requirements.txt index d6275d389..46ff4fa5b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -107,4 +107,7 @@ bk-monitor-report==1.2.1 apigw-manager[cryptography]==1.1.5 -cryptography==3.3.2 \ No newline at end of file +cryptography==3.3.2 + +# notice +bk-notice-sdk==1.2.0 diff --git a/urls.py b/urls.py index d3c7e6288..97cf35d6d 100644 --- a/urls.py +++ b/urls.py @@ -17,6 +17,7 @@ from drf_yasg.views import get_schema_view from rest_framework import permissions from version_log import config +from bk_notice_sdk import config schema_view = get_schema_view( openapi.Info( @@ -38,6 +39,7 @@ url(r"^core/", include("apps.core.urls")), url(r"^", include("apps.node_man.urls")), url(r"^{}".format(config.ENTRANCE_URL), include("version_log.urls", namespace="version_log")), + url(r'^{}'.format(config.ENTRANCE_URL), include(('bk_notice_sdk.urls', 'notice'), namespace='notice')), ] if settings.ENVIRONMENT not in ["production", "prod"]: