Files
fastapi-best-architecture/backend/core/path_conf.py
T
Dylan cd48bb4210 Add i18n support for response message (#753)
* feat: i18n support

* Optimize i18n

* Update the locale in the code

* Update the zh-CN file

* Update the en-US file

* Update the reload filter

* Update locale success plugin value

* Fix lint

* Update pydantic error message translation

* Update to minimal implementation

* Fix minimal missing code
2025-08-15 19:57:10 +08:00

28 lines
581 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from pathlib import Path
# 项目根目录
BASE_PATH = Path(__file__).resolve().parent.parent
# alembic 迁移文件存放路径
ALEMBIC_VERSION_DIR = BASE_PATH / 'alembic' / 'versions'
# 日志文件路径
LOG_DIR = BASE_PATH / 'log'
# 静态资源目录
STATIC_DIR = BASE_PATH / 'static'
# 上传文件目录
UPLOAD_DIR = STATIC_DIR / 'upload'
# 离线 IP 数据库路径
IP2REGION_XDB = STATIC_DIR / 'ip2region.xdb'
# 插件目录
PLUGIN_DIR = BASE_PATH / 'plugin'
# 国际化文件目录
LOCALE_DIR = BASE_PATH / 'locale'