Hello.
The goal is to be able to run multiple Dash apps (dashboards) as well as load .html templates using Flask - so basically to have a website with pages and Dash dashboards.
For running multiple Dash apps I used approach suggested by [chriddyp] (Profile - chriddyp - Plotly Community Forum) in this topic.
Structure:
- app.py
- index.py
- apps
|-- init.py
|-- app1.py
|-- app2.py
For returning .html templates in Flask I used:
from flask import Flask, render_template
import dash
from app import server
server=Flask(name)
@server.route(‘/about/’)
def about():
return render_template(“about.html”)
if name==“main”:
app.run_server(debug=True)
The question is how to combine these both techniques in one if the structure is the following?
- app.py
- index.py
- apps
|-- init.py
|-- app1.py
|-- app2.py- templates
|-- home.html
|-- about.html