diff --git a/core/settings.py b/core/settings.py index eccb0ee6e..26d8cf3c6 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 @@ def __setattr__(self, key, value): def items(self): return self.__dict__.items() -settings = Settings() \ No newline at end of file + +settings = Settings()