Hi everyone!
Looks like there’s a mistake in article https://dash.plotly.com/urls in “Structuring a Multi-Page App” part. Looking at app.py, there are lines:
app = dash.Dash(__name__, suppress_callback_exceptions=True)
server = app.server
As far as I understand, the only purpose of having separate server
variable is to make the app compatible with wsgi so server
is a Flask instance that can be passed to wsgi config so it could run the app. But entry point to this app is not app.py, it’s index.py. So, the line
server = app.server
should be moved to index.py right after line
from app import app
This way the app can be run under wsgi like so:
uwsgi ... index:server
but it never works as it posted on the article with
uwsgi ... app:server
since inside app.py there is no app.layout defined.