selecta-highscore/highscore/app/config.py

26 lines
657 B
Python

from pathlib import Path
from pydantic_settings import BaseSettings, SettingsConfigDict
BASE_DIR = Path(__file__).resolve().parent.parent
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=BASE_DIR / ".env", env_file_encoding="utf-8")
django_secret_key: str = ""
debug: bool = True
allowed_hosts: list[str] = []
installed_apps: list[str] = []
api_secret: str = "selecta-secret"
db_engine: str = "django.db.backends.postgresql"
db_name: str = "selecta-highscore"
db_user: str = "postgres"
db_password: str = ""
db_host: str = "localhost"
db_port: int = 5432
settings = Settings()