Files
fastapi_best_architecture/backend/core/path_conf.py
Wu Clan 5e438c685d Refactor the backend architecture (#299)
* define the basic architecture

* Update script and deployment file locations

* Update the route registration

* Fix CI download dependencies

* Updated ruff to 0.3.3

* Update app subdirectory naming

* Update the model import

* fix pre-commit pdm lock

* Update the service directory naming

* Add CRUD method documents

* Fix the issue of circular import

* Update the README document

* Update the SQL statement for create tables

* Update docker scripts and documentation

* Fix docker scripts

* Update the backend README.md

* Add the security folder and move the redis client

* Update the configuration item

* Fix environment configuration reads

* Update the default configuration

* Updated README description

* Updated the user registration API

* Fix test cases

* Update the celery configuration

* Update and fix celery configuration

* Updated the celery structure

* Update celery tasks and api

* Add celery flower

* Update the import style

* Update contributors
2024-03-22 18:16:15 +08:00

22 lines
606 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
from pathlib import Path
# 获取项目根目录
# 或使用绝对路径指到backend目录为止例如windowsBasePath = D:\git_project\fastapi_mysql\backend
BasePath = Path(__file__).resolve().parent.parent
# alembic 迁移文件存放路径
ALEMBIC_Versions_DIR = os.path.join(BasePath, 'alembic', 'versions')
# 日志文件路径
LOG_DIR = os.path.join(BasePath, 'log')
# 离线 IP 数据库路径
IP2REGION_XDB = os.path.join(BasePath, 'static', 'ip2region.xdb')
# 挂载静态目录
STATIC_DIR = os.path.join(BasePath, 'static')