diff --git a/app/core/config.py b/app/core/config.py index c75dbd5..bc18b47 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -1,5 +1,5 @@ from pathlib import Path -from typing import List +from typing import ClassVar, List from pydantic import AnyHttpUrl, EmailStr, validator from pydantic_settings import BaseSettings @@ -16,7 +16,7 @@ class Settings(BaseSettings): ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 7 # 7 days # Database setup - DB_DIR = Path("/app") / "storage" / "db" + DB_DIR: ClassVar[Path] = Path("/app") / "storage" / "db" DB_DIR.mkdir(parents=True, exist_ok=True) SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite" @@ -58,9 +58,10 @@ class Settings(BaseSettings): and values.get("EMAILS_FROM_EMAIL") ) - class Config: - case_sensitive = True - env_file = ".env" + model_config = { + "case_sensitive": True, + "env_file": ".env" + } settings = Settings() \ No newline at end of file