This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new eff5952 Alternate PR to #3970 (#3997)
eff5952 is described below
commit eff5952641a6e03f6d910f688985e75824d7422c
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Mon Dec 4 08:19:51 2017 -0800
Alternate PR to #3970 (#3997)
---
superset/__init__.py | 6 ++++++
superset/config.py | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/superset/__init__.py b/superset/__init__.py
index 099edc1..c96fea8 100644
--- a/superset/__init__.py
+++ b/superset/__init__.py
@@ -160,4 +160,10 @@ module_datasource_map =
app.config.get('DEFAULT_MODULE_DS_MAP')
module_datasource_map.update(app.config.get('ADDITIONAL_MODULE_DS_MAP'))
ConnectorRegistry.register_sources(module_datasource_map)
+# Hook that provides administrators a handle on the Flask APP
+# after initialization
+flask_app_mutator = app.config.get('FLASK_APP_MUTATOR')
+if flask_app_mutator:
+ flask_app_mutator(app)
+
from superset import views # noqa
diff --git a/superset/config.py b/superset/config.py
index 8f9058b..e169f12 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -322,6 +322,12 @@ ROBOT_PERMISSION_ROLES = ['Public', 'Gamma', 'Alpha',
'Admin', 'sql_lab']
CONFIG_PATH_ENV_VAR = 'SUPERSET_CONFIG_PATH'
+# If a callable is specified, it will be called at app startup while passing
+# a reference to the Flask app. This can be used to alter the Flask app
+# in whatever way.
+# example: FLASK_APP_MUTATOR = lambda x: x.before_request = f
+FLASK_APP_MUTATOR = None
+
# smtp server configuration
EMAIL_NOTIFICATIONS = False # all the emails are sent using dryrun
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].