From 4b9c4a550e382c3c43a73d88dc1935de0aa1540a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E9=98=B3?= Date: Thu, 14 Aug 2025 14:31:31 +0800 Subject: [PATCH] feat: support vastbase --- apps/jumpserver/settings/base.py | 6 +++++- pyproject.toml | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/jumpserver/settings/base.py b/apps/jumpserver/settings/base.py index bf929ef97..165784645 100644 --- a/apps/jumpserver/settings/base.py +++ b/apps/jumpserver/settings/base.py @@ -246,9 +246,13 @@ MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage' DB_OPTIONS = {} DB_ENGINE = CONFIG.DB_ENGINE.lower() +if DB_ENGINE == 'vastbase': + DB_BACKEND = 'django_vastbase_backend' +else: + DB_BACKEND = f'django.db.backends.{DB_ENGINE}' DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.{}'.format(DB_ENGINE), + 'ENGINE': DB_BACKEND, 'NAME': CONFIG.DB_NAME, 'HOST': CONFIG.DB_HOST, 'PORT': CONFIG.DB_PORT, diff --git a/pyproject.toml b/pyproject.toml index ed630f941..85683d0e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -142,7 +142,7 @@ dependencies = [ 'polib>=01.2.0', 'azure-identity==1.16.0', 'azure-keyvault-secrets==4.9.0', - 'psycopg2-binary==2.9.6', + "psycopg2-binary==2.9.10", 'pycountry>=024.6.1', 'premailer==3.10.0', 'azure-storage-blob==12.17.0', @@ -153,7 +153,7 @@ dependencies = [ 's3transfer==0.6.1', 'xmlsec==1.3.14', 'playwright==1.53.0', - 'pdf2image==1.17.0' + 'pdf2image==1.17.0', ] [project.urls] @@ -187,7 +187,8 @@ xpack = [ 'huaweicloudsdkecs==3.1.52', 'huaweicloudsdkcore==3.1.52', 'volcengine-python-sdk==1.0.71', - 'aliyun-python-sdk-rds==2.7.49' + 'aliyun-python-sdk-rds==2.7.49', + "django-vastbase-backend==0.1.1", ] [tool.uv.sources]