Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dash Application Python Button for refresh the page

is there a possibility to write a callback function in Dash (Python) for a button to reload the page (like the updatebutton from the browser?

app.layout =html.Div([
            html.Button(id="refresh"),
            ])

@app.callback(Output('???', '???'),
              [Input('refresh', 'n_clicks')])
def refresh(n):

?
return
?
like image 239
Eric Stralsund Avatar asked Mar 19 '20 18:03

Eric Stralsund


Video Answer


2 Answers

solved!

html.A(html.Button('Refresh Data'),href='/'),
like image 93
Eric Stralsund Avatar answered Oct 21 '22 00:10

Eric Stralsund


Another way to just make a command to refresh the page is: html.Meta(httpEquiv="refresh",content="60").

This command tells the html to refresh the page after 60 seconds.

like image 38
OOCAZ Avatar answered Oct 21 '22 00:10

OOCAZ