Quantcast
Channel: ЁЯОЫя╕П Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271
тЖз

Using Dash in Flask App, extend base.html using Jinja2

$
0
0

I want to embed several dash apps into a larger Flask application.

IтАЩve followed this tutorial to setup the project structure:

In the flask app I am using Jinja2 to extend each page from a base.html file to carry over the navbar, style sheets, etc.

However, when I try to extend the index_string of the dash app in a similar way I run into roadblocks.

I modified the index_string per the dash documentation: https://dash.plotly.com/external-resources

I set my index_string to:

    dashapp1.index_string = '''
    {% extends "base.html" %}
    {% block content %}
        {%app_entry%}
        <footer>
            {%config%}
            {%scripts%}
            {%renderer%}
        </footer>
    {% endblock content %}
    '''

but it fails to pull in the base.html template.

Any help to resolve this would be greatly appreciated

image

2 posts - 1 participant

Read full topic

тЖз

Viewing all articles
Browse latest Browse all 6271

Trending Articles