diff --git a/highscore/app/config.py b/highscore/app/config.py index 3a4861e..a71be77 100644 --- a/highscore/app/config.py +++ b/highscore/app/config.py @@ -6,7 +6,11 @@ BASE_DIR = Path(__file__).resolve().parent.parent class Settings(BaseSettings): - model_config = SettingsConfigDict(env_file=BASE_DIR / ".env", env_file_encoding="utf-8") + _env_file = BASE_DIR / ".env" + model_config = SettingsConfigDict( + env_file=_env_file if _env_file.exists() else None, + env_file_encoding="utf-8", + ) django_secret_key: str = "" debug: bool = True