forked from munnsmunns/dash-hello-world
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
34 lines (30 loc) · 956 Bytes
/
app.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
import dash
from dash import Dash, dcc, html
app = Dash(__name__, use_pages=True)
app.layout = html.Div(
[
html.Nav(
html.Div(
html.Ul(
[
html.Li(
dcc.Link(
f"{page['name']}",
href=page["relative_path"],
className="nav-link active",
),
className="nav-item-dropdown",
)
for page in dash.page_registry.values()
],
className="navbar-nav me-auto mb-2 mb-lg-0",
),
className="container-fluid",
),
className="navbar navbar-expand-lg bg-light",
),
dash.page_container,
]
)
if __name__ == "__main__":
app.run_server(debug=True)