Skip to content

Commit

Permalink
fix: 基础目录设置
Browse files Browse the repository at this point in the history
  • Loading branch information
vastsa committed Jan 18, 2024
1 parent ab1d3e1 commit 029307a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -78,4 +79,5 @@ def __setattr__(self, key, value):
def items(self):
return self.__dict__.items()

settings = Settings()

settings = Settings()

0 comments on commit 029307a

Please sign in to comment.