Several modifications are proposed in plotly/dashR#225 to support user-defined server routes in Dash for R, which will include a convenience function for URL redirects.
Following discussion with @alexcjohnson, it seems that we could make the same UI improvements within Dash for Python as well.
For example, this server.route decorator:
@server.route('/daq')defredirect_daq():
returnredirect('/dash-daq', code=301)could be rewritten more concisely as
app.redirect('/daq', '/dash-daq')Further, a parameterized redirect such as
@server.route('/daq/<path:subpath>')defredirect_daq_part(subpath):
returnredirect('/dash-daq/{}'.format(escape(subpath)), code=301)... might look instead like
app.redirect('/daq/<path:subpath>', lambdasubpath: '/dash-daq/{}'.format(escape(subpath)))@Marc-Andre-Rivet
Several modifications are proposed in plotly/dashR#225 to support user-defined server routes in Dash for R, which will include a convenience function for URL redirects.
Following discussion with @alexcjohnson, it seems that we could make the same UI improvements within Dash for Python as well.
For example, this
server.routedecorator:could be rewritten more concisely as
Further, a parameterized redirect such as
... might look instead like
@Marc-Andre-Rivet