Skip to content

Commit 23a0973

Browse files
authored
Merge pull request #133 from etpinard/updates-for-dash2
Updates for Dash 2.0
2 parents c0bc329 + 21ee97d commit 23a0973

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# dash is required to call `build:py`
2-
dash[dev]>=1.15.0
2+
dash[dev]>=2.0.0

{{cookiecutter.project_shortname}}/usage.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import {{cookiecutter.project_shortname}}
2-
import dash
3-
from dash.dependencies import Input, Output
4-
import dash_html_components as html
2+
from dash import Dash, callback, html, Input, Output
53

6-
app = dash.Dash(__name__)
4+
app = Dash(__name__)
75

86
app.layout = html.Div([
97
{{cookiecutter.project_shortname}}.{{cookiecutter.component_name}}(
@@ -15,7 +13,7 @@
1513
])
1614

1715

18-
@app.callback(Output('output', 'children'), [Input('input', 'value')])
16+
@callback(Output('output', 'children'), Input('input', 'value'))
1917
def display_output(value):
2018
return 'You have entered {}'.format(value)
2119

0 commit comments

Comments
 (0)