superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] gbates101 opened a new issue #5124: Loading appbuilder views instead of flask blueprints
Date Fri, 01 Jun 2018 15:12:31 GMT
gbates101 opened a new issue #5124: Loading appbuilder views instead of flask blueprints
   - [x] I have checked the superset logs for python stacktraces and included it here as text
if any
   - [x] I have reproduced the issue with at least the latest released version of superset
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar
   ### Superset version
   ### Expected results
   Writing a view from appbuilder's [BaseView](
(like superset does internally) should be loadable. Could be similar to how [ADDITIONAL_MODULE_DS_MAP](
config setting is used.
   ### Actual results
   Unless I modify source and append an import to [](
to load my views, I have to rewrite my view as a [Flask blueprint](
to import it.
   ### Steps to reproduce
   1. Create a class that extends `BaseSupersetView`.
   2. Use appbuilder API to import it.
   3. Load module as a blueprint in config.
   4. Nothing happens. It must be rewritten to use flask blueprint API.
   Here is the view I was working with. Creating a `Blueprint` object and adding to `BLUEPRINTS`
list in config will not load this properly, but adding an import statement at the end of
   from flask_appbuilder.baseviews import expose_api
   from import has_access_api
   from flask_babel import gettext as __
   from superset import appbuilder
   from superset.views.core import BaseSupersetView
   import plaid.superset.datasource_helpers as dh
   class MyView(BaseSupersetView):
       @expose_api(name='api', url='/api/refresh', methods=['GET'])
       @expose_api(name='api', url='/api/refresh/<project_id>', methods=['GET'])
       def refresh(self, project_id=None):
           if project_id:
               # Sync everything if no project ID specified.

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message