airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] ashb commented on a change in pull request #6223: [AIRFLOW-5578] Adding the ability to define custom IndexView
Date Wed, 06 Nov 2019 13:43:57 GMT
ashb commented on a change in pull request #6223: [AIRFLOW-5578] Adding the ability to define
custom IndexView
URL: https://github.com/apache/airflow/pull/6223#discussion_r343100499
 
 

 ##########
 File path: airflow/www/blueprints.py
 ##########
 @@ -18,10 +18,19 @@
 # under the License.
 #
 from flask import Blueprint, redirect, url_for
+from flask_appbuilder import IndexView, expose
 
 routes = Blueprint('routes', __name__)
 
+# Place any Flask Blueprint routes (non Flask-Appbuilder ones) here
 
-@routes.route('/')
-def index():
-    return redirect(url_for('Airflow.index'))
+# We can't put this into airflow.www.views because then we would have to import the views
module
+# inside airflow.www.app prior to the appbuilder object being set up.
+# This would break other code in views not using the cached_appbuilder() function.
+
+
+class AirflowIndexView(IndexView):
 
 Review comment:
   I think this is better suited inside airflow/www/app.py

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

Mime
View raw message