Closed anders-kiaer closed 5 years ago
Looks like the solution is to not to use dash
in this case, but rather directly going to the attached flask
server.
According to the flask docs this will avoid full debug mode, but still activate reload:
app.run_server([...], debug=False, use_reloader=True)
The documentation also states that the run()
command on a flask server, together with reload, is not well supported. Instead the docs suggest using the command line client, e.g. something like:
FLASK_APP=webviz_app:server
flask run --no-debugger --reload
Wrt. automatic browser refresh (not only reload of app on server), some experiences here: https://stackoverflow.com/questions/51379705/flask-auto-reload-does-not-refresh-browser https://github.com/lepture/python-livereload#flask
If
debug
in theflask
server is not set toTrue
, it looks like hot reloading of the dash application is not working. According to dash documentation, there is a flagdev_tools_hot_reload
which can be set toTrue
to enable hot reloading (without enabling the whole suite of debug tools).Here is the line in the template setting
debug
/dev_tools_hot_reload
and here is the dash documentation on the dev tools.