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/03 16:48:35 UTC

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

mistercrunch 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_r362879459
 
 

 ##########
 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:
   There will be a fair amount of view shuffling as we break down and reorg modules. First goal is to move view init out of module scope, then find the right home for each view and init call. This is a good step in the right direction.

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