From 3a9324520ebbe591b182442dfa4b3c9d9a77cc8a Mon Sep 17 00:00:00 2001 From: mizhexiaoxiao <1157861072@qq.com> Date: Wed, 23 Aug 2023 10:43:31 +0800 Subject: [PATCH] Update --- app/__init__.py | 2 +- app/settings/config.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index ad9acd9..5b1bbfc 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -13,7 +13,7 @@ from app.core.init_app import ( try: from app.settings.config import settings except ImportError: - raise SettingNotFound("Can not import settings. Create settings file from template.config.py") + raise SettingNotFound("Can not import settings") def create_app() -> FastAPI: diff --git a/app/settings/config.py b/app/settings/config.py index 8552743..4e92390 100644 --- a/app/settings/config.py +++ b/app/settings/config.py @@ -6,8 +6,8 @@ from pydantic import BaseSettings class Settings(BaseSettings): VERSION: str = "0.1.0" - APP_TITLE: str = "Template Application" - PROJECT_NAME: str = "Template Application" + APP_TITLE: str = "Vue FastAPI Admin" + PROJECT_NAME: str = "Vue FastAPI Admin" APP_DESCRIPTION: str = "Description" CORS_ORIGINS: typing.List = ["*"] @@ -36,7 +36,7 @@ class Settings(BaseSettings): LOGS_ROOT: str = os.path.join(BASE_DIR, "app/logs") SECRET_KEY: str = "3488a63e1765035d386f05409663f55c83bfae3b3c61a932744b20ad14244dcf" # openssl rand -hex 32 JWT_ALGORITHM: str = "HS256" - JWT_ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 # 7 day + JWT_ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 7 # 7 day TORTOISE_ORM = { "connections": { "sqlite": {