Probably, a mistake in Multi-Page Apps article

Hi everyone!

Looks like there’s a mistake in article in “Structuring a Multi-Page App” part. Looking at, 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, it’s So, the line

server = app.server

should be moved to 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 there is no app.layout defined.

1 Like