aboutsummaryrefslogtreecommitdiff
path: root/qc_app
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app')
-rw-r--r--qc_app/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/qc_app/__init__.py b/qc_app/__init__.py
index b40ec46..e44f471 100644
--- a/qc_app/__init__.py
+++ b/qc_app/__init__.py
@@ -1,6 +1,7 @@
"""The Quality-Control Web Application entry point"""
import os
+from pathlib import Path
from flask import Flask
@@ -20,7 +21,8 @@ def override_settings_with_envvars(
def create_app():
"""The application factory"""
app = Flask(__name__)
- app.config.from_pyfile(os.path.join(os.getcwd(), "etc/default_config.py"))
+ app.config.from_pyfile(os.path.join(
+ Path(__file__).parent.parent, "etc/default_config.py"))
if "QCAPP_CONF" in os.environ:
app.config.from_envvar("QCAPP_CONF") # Override defaults with instance path