From 4a63e7d35424864ba4fad8278cb3680a877c99fa Mon Sep 17 00:00:00 2001 From: lan Date: Thu, 18 Jan 2024 18:31:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9F=BA=E7=A1=80=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/settings.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/settings.py b/core/settings.py index eccb0ee..26d8cf3 100644 --- a/core/settings.py +++ b/core/settings.py @@ -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() \ No newline at end of file + +settings = Settings()