Skip to content

Commit

Permalink
Alternate PR to #3970 (#3997)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Dec 4, 2017
1 parent f10395b commit eff5952
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions superset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,10 @@ def index(self):
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
6 changes: 6 additions & 0 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ class CeleryConfig(object):

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
Expand Down

0 comments on commit eff5952

Please sign in to comment.