-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.py
35 lines (28 loc) · 964 Bytes
/
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
# -*- coding: utf-8 -*-
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from app import app
from apps import (toc, normal_distribution, t_distribution, cohen_d, diagnostic_tests)
server = app.server
app.layout = html.Div([
dcc.Location(id='url', refresh=False),
html.Div(id='page-content')
])
@app.callback(Output('page-content', 'children'),
[Input('url', 'pathname')])
def display_page(pathname):
if pathname == '/' or pathname == '/toc':
return toc.layout
elif pathname == '/normal_distribution':
return normal_distribution.layout
elif pathname == '/t_distribution':
return t_distribution.layout
elif pathname == '/cohen_d':
return cohen_d.layout
elif pathname == '/diagnostic_tests':
return diagnostic_tests.layout
else:
return "404"
if __name__ == '__main__':
app.run_server(debug=True)