From 13bc6684cc2f90b1fdac306a2ce9a8849911b43f Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 15 Mar 2024 04:14:47 +0300 Subject: Move defaults settings into qc_app module. --- qc_app/__init__.py | 4 ++-- qc_app/default_settings.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 qc_app/default_settings.py (limited to 'qc_app') diff --git a/qc_app/__init__.py b/qc_app/__init__.py index e44f471..43831d8 100644 --- a/qc_app/__init__.py +++ b/qc_app/__init__.py @@ -21,8 +21,8 @@ def override_settings_with_envvars( def create_app(): """The application factory""" app = Flask(__name__) - app.config.from_pyfile(os.path.join( - Path(__file__).parent.parent, "etc/default_config.py")) + app.config.from_pyfile( + Path(__file__).parent.joinpath("default_settings.py")) if "QCAPP_CONF" in os.environ: app.config.from_envvar("QCAPP_CONF") # Override defaults with instance path diff --git a/qc_app/default_settings.py b/qc_app/default_settings.py new file mode 100644 index 0000000..7a9da0f --- /dev/null +++ b/qc_app/default_settings.py @@ -0,0 +1,14 @@ +""" +The default configuration file. The values here should be overridden in the +actual configuration file used for the production and staging systems. +""" + +import os + +LOG_LEVEL = os.getenv("LOG_LEVEL", "WARNING") +SECRET_KEY = b"" +UPLOAD_FOLDER = "/tmp/qc_app_files" +REDIS_URL = "redis://" +JOBS_TTL_SECONDS = 1209600 # 14 days +GNQC_REDIS_PREFIX="GNQC" +SQL_URI = "" -- cgit v1.2.3