You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/12/27 09:01:44 UTC
[GitHub] XD-DENG closed pull request #4375: [AIRFLOW-XXX] Fix/complete
example code in plugins.rst
XD-DENG closed pull request #4375: [AIRFLOW-XXX] Fix/complete example code in plugins.rst
URL: https://github.com/apache/incubator-airflow/pull/4375
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docs/plugins.rst b/docs/plugins.rst
index 4bd55cead9..3a477c2152 100644
--- a/docs/plugins.rst
+++ b/docs/plugins.rst
@@ -134,6 +134,7 @@ definitions in Airflow.
from flask import Blueprint
from flask_admin import BaseView, expose
from flask_admin.base import MenuLink
+ from flask_appbuilder import BaseView as AppBuilderBaseView
# Importing base classes that we need to derive
from airflow.hooks.base_hook import BaseHook
@@ -183,6 +184,8 @@ definitions in Airflow.
# Creating a flask appbuilder BaseView
class TestAppBuilderBaseView(AppBuilderBaseView):
+ default_view = "test"
+
@expose("/")
def test(self):
return self.render("test_plugin/test.html", content="Hello galaxy!")
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services