This commit is contained in:
mizhexiaoxiao 2023-08-23 10:43:31 +08:00
parent 452fdee635
commit 3a9324520e
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ from app.core.init_app import (
try: try:
from app.settings.config import settings from app.settings.config import settings
except ImportError: 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: def create_app() -> FastAPI:

View File

@ -6,8 +6,8 @@ from pydantic import BaseSettings
class Settings(BaseSettings): class Settings(BaseSettings):
VERSION: str = "0.1.0" VERSION: str = "0.1.0"
APP_TITLE: str = "Template Application" APP_TITLE: str = "Vue FastAPI Admin"
PROJECT_NAME: str = "Template Application" PROJECT_NAME: str = "Vue FastAPI Admin"
APP_DESCRIPTION: str = "Description" APP_DESCRIPTION: str = "Description"
CORS_ORIGINS: typing.List = ["*"] CORS_ORIGINS: typing.List = ["*"]
@ -36,7 +36,7 @@ class Settings(BaseSettings):
LOGS_ROOT: str = os.path.join(BASE_DIR, "app/logs") LOGS_ROOT: str = os.path.join(BASE_DIR, "app/logs")
SECRET_KEY: str = "3488a63e1765035d386f05409663f55c83bfae3b3c61a932744b20ad14244dcf" # openssl rand -hex 32 SECRET_KEY: str = "3488a63e1765035d386f05409663f55c83bfae3b3c61a932744b20ad14244dcf" # openssl rand -hex 32
JWT_ALGORITHM: str = "HS256" 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 = { TORTOISE_ORM = {
"connections": { "connections": {
"sqlite": { "sqlite": {