Error in the documentation

The integrating dash page states:

wsgi.py

from werkzeug.wsgi import DispatcherMiddleware

from flask_app import flask_app
from app1 import app as app1
from app2 import app as app2

application = DispatcherMiddleware(flask_app, {
    '/app1': app1.server,
    '/app2': app2.server,
})

This now fails because wsgi refactored their codebase in version 0.15 and that deprecation has only come into force since wsgi 1.0 was released

Middleware from werkzeug.wsgi has moved to separate modules under werkzeug.middleware , along with the middleware moved from werkzeug.contrib . The old werkzeug.wsgi imports are deprecated and will be removed in version 1.0. ([#1452])

  • werkzeug.wsgi.DispatcherMiddleware has moved to [ werkzeug.middleware.dispatcher.DispatcherMiddleware ]
  • werkzeug.wsgi.ProxyMiddleware as moved to [ werkzeug.middleware.http_proxy.ProxyMiddleware ].
  • werkzeug.wsgi.SharedDataMiddleware has moved to [ werkzeug.middleware.shared_data.SharedDataMiddleware ].

Also note: there’s no indication where documentation errors should be posted.

Thanks for sharing! You can create an issue here: https://github.com/plotly/dash-docs/issues

Or better yet, update the file directly with the change and make a pull request :slight_smile: https://github.com/plotly/dash-docs/blob/master/dash_docs/chapters/integrating_dash/index.py#L142-L155

2 Likes