fix: 基础目录设置

This commit is contained in:
lan
2024-01-18 18:31:11 +08:00
parent 4b75d2c044
commit 4a63e7d354
+3 -1
View File
@@ -4,7 +4,8 @@
# @Software: PyCharm
from pathlib import Path
data_root = Path('./data')
BASE_DIR = Path(__file__).resolve().parent.parent
data_root = BASE_DIR / 'data'
if not data_root.exists():
data_root.mkdir(parents=True, exist_ok=True)
env_path = data_root / '.env2'
@@ -78,4 +79,5 @@ class Settings:
def items(self):
return self.__dict__.items()
settings = Settings()