Skip to content

Commit

Permalink
Merge pull request #133 from etpinard/updates-for-dash2
Browse files Browse the repository at this point in the history
Updates for Dash 2.0
  • Loading branch information
alexcjohnson committed Sep 23, 2022
2 parents c0bc329 + 21ee97d commit 23a0973
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion {{cookiecutter.project_shortname}}/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# dash is required to call `build:py`
dash[dev]>=1.15.0
dash[dev]>=2.0.0
8 changes: 3 additions & 5 deletions {{cookiecutter.project_shortname}}/usage.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import {{cookiecutter.project_shortname}}
import dash
from dash.dependencies import Input, Output
import dash_html_components as html
from dash import Dash, callback, html, Input, Output

app = dash.Dash(__name__)
app = Dash(__name__)

app.layout = html.Div([
{{cookiecutter.project_shortname}}.{{cookiecutter.component_name}}(
Expand All @@ -15,7 +13,7 @@
])


@app.callback(Output('output', 'children'), [Input('input', 'value')])
@callback(Output('output', 'children'), Input('input', 'value'))
def display_output(value):
return 'You have entered {}'.format(value)

Expand Down

0 comments on commit 23a0973

Please sign in to comment.