updated components and page navigator

This commit is contained in:
2025-04-20 18:25:00 +03:00
parent 6ab4410a82
commit a0daf45530
36 changed files with 1939 additions and 252 deletions

View File

@@ -181,7 +181,7 @@ def init_applications_for_tenant(super_user: BuildLivingSpace, db_session=None)
),
dict(
name="TenantSendMessageToBuildManager",
application_code="app000014",
application_code="app000022",
site_url="/tenant/messageToBM",
application_type="Dash",
description="Individual Page for tenant send message to build manager",
@@ -200,6 +200,7 @@ def init_applications_for_tenant(super_user: BuildLivingSpace, db_session=None)
application_type="Dash",
description="Individual Page for tenant account view",
),
]
for list_of_created_app in list_of_created_apps:

View File

@@ -63,7 +63,7 @@ version_path_separator = os
# are written from script.py.mako
# output_encoding = utf-8
sqlalchemy.url = postgresql+psycopg2://berkay_wag_user:berkay_wag_user_password@postgres-service:5432/wag_database
sqlalchemy.url = postgresql+psycopg2://postgres:password@10.10.2.14:5432/postgres
[post_write_hooks]

View File

@@ -1,7 +1,9 @@
from logging.config import fileConfig
import os
from sqlalchemy import engine_from_config
from sqlalchemy import pool
from sqlalchemy import create_engine
from alembic import context
from Schemas import *
@@ -11,6 +13,19 @@ from Controllers.Postgres.database import Base
# access to the values within the .ini file in use.
config = context.config
# Override sqlalchemy.url with environment variables if they exist
db_host = os.getenv("POSTGRES_HOST", "10.10.2.14")
db_port = os.getenv("POSTGRES_PORT", "5432")
db_user = os.getenv("POSTGRES_USER", "postgres")
db_password = os.getenv("POSTGRES_PASSWORD", "password")
db_name = os.getenv("POSTGRES_DB", "postgres")
# Build the connection URL from environment variables
db_url = f"postgresql+psycopg2://{db_user}:{db_password}@{db_host}:{db_port}/{db_name}"
# Override the sqlalchemy.url in the alembic.ini file
config.set_main_option("sqlalchemy.url", db_url)
# Interpret the config file for Python logging.
# This line sets up loggers basically.
if config.config_file_name is not None:

View File

@@ -1,3 +1,4 @@
import os
from Controllers.Postgres.database import get_db
from init_app_defaults import create_application_defaults
@@ -8,7 +9,7 @@ from init_services import create_modules_and_services_and_actions
from init_address import create_one_address
from init_occ_defaults import create_occupant_defaults
set_alembic = False
set_alembic = bool(os.getenv("set_alembic", 0))
if __name__ == "__main__":