-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.py
42 lines (35 loc) · 1.22 KB
/
index.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import dash
import dash_bootstrap_components as dbc
import flask
server = flask.Flask(__name__)
app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP], server=server,use_pages=True)
app.config.suppress_callback_exceptions = True
# app.config['SQLALCHEMY_DATABASE_URI'] = os.environ["DATABASE_URL"]
# app = dash.Dash(__name__, use_pages=True, external_stylesheets=[dbc.themes.BOOTSTRAP])
# app.config["SESSION_PERMANENT"] = False
# app.config["SESSION_TYPE"] = "filesystem"
# app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
# app.config["SESSION_PERMANENT"] = False
# app.config["SESSION_TYPE"] = "filesystem"
# app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
navbar = dbc.NavbarSimple(
dbc.DropdownMenu(
[
dbc.DropdownMenuItem(page["name"], href=page["path"])
for page in dash.page_registry.values()
if page["module"] != "pages.not_found_404"
],
nav=True,
label="More Pages",
),
brand="Multi Page App Demo",
color="primary",
dark=True,
className="mb-2",
)
app.layout = dbc.Container(
[navbar, dash.page_container],
fluid=True,
)
if __name__ == "__main__":
app.run_server(debug=True)