Skip to content

Commit

Permalink
migrate usage.py to dash 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Nov 1, 2021
1 parent 6bc7922 commit 21ee97d
Showing 1 changed file with 3 additions and 5 deletions.
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 21ee97d

Please sign in to comment.