You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/01/02 19:09:33 UTC

[GitHub] [incubator-superset] craig-rueda commented on a change in pull request #8912: Moving appbuilder.xxx out of view files and into app.py

craig-rueda commented on a change in pull request #8912: Moving appbuilder.xxx out of view files and into app.py
URL: https://github.com/apache/incubator-superset/pull/8912#discussion_r362591283
 
 

 ##########
 File path: superset/app.py
 ##########
 @@ -114,10 +116,318 @@ def __call__(self, *args, **kwargs):
 
         celery_app.Task = AppContextTask
 
-    @staticmethod
-    def init_views() -> None:
-        # TODO - This should iterate over all views and register them with FAB...
-        from superset import views  # noqa pylint: disable=unused-variable
+    def init_views(self) -> None:
+        #
+        # We're doing local imports, as several of them import models which in turn try to import
+        # the global Flask app
+        #
+        from superset.connectors.druid.views import (
 
 Review comment:
   Absolutely makes sense. I would like to do that as another step, however. This change will let us move in that direction as it removes some of the side effects that exist in the current setup. At some point, I'll pull relevant pieces out into their own "configuration" classes which will do just what you said - break things up and allow for a bit more composability. I'd also like to update the CLI WRT these changes.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org