From c2dd26c5d38f62f1b63a58263df325742d83e108 Mon Sep 17 00:00:00 2001 From: n0body Date: Fri, 5 Sep 2025 19:35:03 +0300 Subject: [PATCH] Changed config.py Table and schema names can now be configured in .env file --- src/app_creator.py | 4 ++-- src/config.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app_creator.py b/src/app_creator.py index 8a52d26..fecdd91 100644 --- a/src/app_creator.py +++ b/src/app_creator.py @@ -11,8 +11,8 @@ if config.enable_api_docs: else: docs_url = None -schema_name = 'harticle' -table_name = 'articles' +schema_name = config.schema_name +table_name = config.table_name @asynccontextmanager diff --git a/src/config.py b/src/config.py index 1d60cdc..1d0bb96 100644 --- a/src/config.py +++ b/src/config.py @@ -8,3 +8,5 @@ host_name = config('HOST_NAME') port = config('PORT') logging_level = config('LOGGING_LEVEL') enable_api_docs = config('ENABLE_API_DOCS', cast=bool) +schema_name = config('SCHEMA_NAME') +table_name = config('TABLE_NAME') \ No newline at end of file