Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: 引入 django-versionlog 支持版本日志国际化 (closed #1602) #1603

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,7 @@ def get_standard_redis_mode(cls, config_redis_mode: str, default: Optional[str]


if BK_BACKEND_CONFIG:
# 后台不需要version log
DISABLED_APPS = ["version_log"]
DISABLED_APPS = []

# 后台根路径与SaaS
BASE_DIR = os.path.dirname(PROJECT_ROOT)
Expand Down Expand Up @@ -706,7 +705,7 @@ def get_standard_redis_mode(cls, config_redis_mode: str, default: Optional[str]
# 是否使用CMDB订阅机制去主动触发插件下发
USE_CMDB_SUBSCRIPTION_TRIGGER = get_type_env(key="BKAPP_USE_CMDB_SUBSCRIPTION_TRIGGER", default=True, _type=bool)

VERSION_LOG = {"MD_FILES_DIR": os.path.join(PROJECT_ROOT, "release")}
VERSION_LOG = {"MD_FILES_DIR": os.path.join(PROJECT_ROOT, "release"), "LANGUAGE_MAPPINGS": {"en": "en"}}

# remove disabled apps
if locals().get("DISABLED_APPS"):
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ django-cors-headers==3.5.0

# 版本日志
mistune==0.8.4
django-versionlog==1.6.0

# 腾讯云SDK
tencentcloud-sdk-python==3.0.101
Expand Down
3 changes: 1 addition & 2 deletions urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework import permissions

from version_log import config

schema_view = get_schema_view(
Expand All @@ -38,7 +37,7 @@
url(r"^backend/", include("apps.backend.urls")),
url(r"^core/", include("apps.core.urls")),
url(r"^", include("apps.node_man.urls")),
url(r"^{}".format(config.ENTRANCE_URL), include("version_log.urls")),
url(r"^{}".format(config.ENTRANCE_URL), include("version_log.urls", namespace="version_log")),
]

if settings.ENVIRONMENT not in ["production", "prod"]:
Expand Down
15 changes: 0 additions & 15 deletions version_log/__init__.py

This file was deleted.

24 changes: 0 additions & 24 deletions version_log/apps.py

This file was deleted.

92 changes: 0 additions & 92 deletions version_log/config.py

This file was deleted.

69 changes: 0 additions & 69 deletions version_log/decorators.py

This file was deleted.

72 changes: 0 additions & 72 deletions version_log/middleware.py

This file was deleted.

37 changes: 0 additions & 37 deletions version_log/migrations/0001_initial.py

This file was deleted.

12 changes: 0 additions & 12 deletions version_log/migrations/__init__.py

This file was deleted.

Loading