[ 
https://issues.apache.org/jira/browse/AIRFLOW-3363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17157404#comment-17157404
 ] 

igor commented on AIRFLOW-3363:
-------------------------------

Hello [~ran.zvi]

I had the same issue, but after investigation it was noticed that template path 
in Blueprints was incorrect. Please do remember that you need to create and 
register Blueprint for your custom view.

> Plugin templates not rendered by Flask appbuilder's baseview
> ------------------------------------------------------------
>
>                 Key: AIRFLOW-3363
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3363
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: plugins
>    Affects Versions: 1.10.0
>         Environment: Docker 
>            Reporter: Ran Zvi
>            Priority: Major
>
> Hello, we're having issues with the new F.A.B plugins (rbac), the 
> documentation lacks the import for *{{AppBuilderBaseView}}*{{:}}
>  
> {code:java}
> # Creating a flask appbuilder BaseView
>  class TestAppBuilderBaseView(AppBuilderBaseView):
>  @expose("/")
>  def test(self):
>  return self.render("test_plugin/test.html", content="Hello galaxy!"){code}
>  However after a bit of digging I found out it is probably imported from F.A.B
> {code:java}
> from flask_appbuilder import BaseView as AppBuilderBaseView{code}
>  
> The next issue is that the class lacks a *{{render}}* function and F.A.B only 
> provides a *{{render_template}}* function which ignores the 
> *{{plugins_folder}}*  definition in *{{airflow.cfg}}* and the Blueprint's 
> *{{template_folder}}* definition in the plugin's code.
> We've found out that in F.A.B's *{{Environment}}* Object created by Airflow 
> the only location defined for template location is under *{{www_rbac}}*{{.}}
> We're unable to make any progress due to this Bug, does anyone know how to  
> Thanks in advance!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to