From 656f77ac406f72ef94e41ca2529a7f3fa8d50220 Mon Sep 17 00:00:00 2001 From: Alexander Kislitsky Date: Fri, 20 May 2016 14:09:49 +0300 Subject: [PATCH] External config supported We are using standard Flask feature for uploading external configuration Change-Id: I6526a9014e51c761ca6841984062004ae4dc3afb Closes-Bug: #1583117 --- tuning_box/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tuning_box/app.py b/tuning_box/app.py index 1bccdf0..f37203b 100644 --- a/tuning_box/app.py +++ b/tuning_box/app.py @@ -295,6 +295,8 @@ def build_app(): app.url_map.converters.update(converters.ALL) api.init_app(app) # init_app spoils Api object if app is a blueprint app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False # silence warning + # TUNINGBOX_SETTINGS is the path to the file with tuning_box configuration + app.config.from_envvar('TUNINGBOX_SETTINGS', silent=True) # These handlers work if PROPAGATE_EXCEPTIONS is on (Nailgun case) app.register_error_handler(sa_exc.IntegrityError, handle_integrity_error) db.db.init_app(app)