Bokeh Plot Problem
Hi all, I'm trying to have two bokeh plots in a flask app with bootstrap columns. I need two.
They are setup as an html and one is loading fine and the other is not showing up.
In my main app.py:
#tell flask to read dashboard page
@app.route('/dashboard')
def dashboard():
# Read content of plot1.html
with open("plot1.html", "r") as f:
plot1_html = f.read()
# Read content of plot2.html
with open("plot2.html", "r") as f:
plot2_html = f.read()
# Pass both plots to the template
return render_template("dashboard.html", plot1_html=plot1_html, plot2_html=plot2_html)
In the dashboard.html:
<!-- map and chart in bootstrap setup-->
<div class="container-fluid">
<div class="row">
<div class="col-md-6">
/r/flask
https://redd.it/1gkiu8s
Hi all, I'm trying to have two bokeh plots in a flask app with bootstrap columns. I need two.
They are setup as an html and one is loading fine and the other is not showing up.
In my main app.py:
#tell flask to read dashboard page
@app.route('/dashboard')
def dashboard():
# Read content of plot1.html
with open("plot1.html", "r") as f:
plot1_html = f.read()
# Read content of plot2.html
with open("plot2.html", "r") as f:
plot2_html = f.read()
# Pass both plots to the template
return render_template("dashboard.html", plot1_html=plot1_html, plot2_html=plot2_html)
In the dashboard.html:
<!-- map and chart in bootstrap setup-->
<div class="container-fluid">
<div class="row">
<div class="col-md-6">
/r/flask
https://redd.it/1gkiu8s
Reddit
From the flask community on Reddit
Explore this post and more from the flask community