I have a web application written in Python - Flask. When the user fill out some settings in one of the pages (POST Request), my controller calculates some functions and plot an output using Bokeh with following command and then I redirect to that HTML page created by Bokeh.
output_file("templates\\" + idx[j]['name'] + ".html", title = "line plots")
TOOLS="resize,crosshair,pan,wheel_zoom,box_zoom,reset,box_select,lasso_select"
p = figure(tools=TOOLS, x_axis_label = 'time', y_axis_label = 'L', plot_width = 1400, plot_height = 900)
All of my HTML pages extends my "Template.HTML" file except the Bokeh generated ones. My question is how can automatically modify Bokeh generated HTML files to also extends my template.html file? This way I have all my nav-bar & jumbotron on top of the Bokeh html files.
{% extends "template.html" %}
{% block content %}
<Bokeh.html file>
{% endblock %}