[V0.5] Working application with all 4 screens as of yet.

This commit is contained in:
c-d-p
2025-04-26 13:23:45 +02:00
parent 22a4fc50a5
commit 04d9136b96
15 changed files with 154 additions and 29 deletions

View File

@@ -6,8 +6,14 @@ DOTENV_PATH = os.path.join(os.path.dirname(__file__), "../.env")
class Settings(BaseSettings):
# Database settings - reads DB_URL from environment or .env
DB_URL: str = "postgresql://maia:maia@localhost:5432/maia"
# Database settings - reads from environment or .env
DB_PORT: int = 5432
DB_NAME: str = "maia"
DB_HOST: str
DB_USER: str
DB_PASSWORD: str
DB_URL: str = ""
# Redis settings - reads REDIS_URL from environment or .env, also used for Celery.
REDIS_URL: str = "redis://localhost:6379/0"

View File

@@ -9,6 +9,7 @@ Base = declarative_base() # Used for models
_engine = None
_SessionLocal = None
settings.DB_URL = f"postgresql://{settings.DB_USER}:{settings.DB_PASSWORD}@{settings.DB_HOST}:{settings.DB_PORT}/{settings.DB_NAME}"
def get_engine():
global _engine