[V0.5] Working application with all 4 screens as of yet.
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user