plotly / dash-labs

Work-in-progress technical previews of potential future Dash features.
MIT License
140 stars 39 forks source link

Redirect from '/' results in exception #114

Closed brian-cawley closed 2 years ago

brian-cawley commented 2 years ago

Sample Code:

dash.register_page(__name__, path='/test', redirect_from=['/'])

Results in exception

AssertionError: View function mapping is overwriting an existing endpoint function: /

AnnMarieW commented 2 years ago

Yes, that's correct - you can't redirect from the root directory.

Instead you can do this:

dash.register_page(__name__, path='/', redirect_from=['/test'])