From 5d8f35efa9cb2eae89391ffd6d2ef7c0a71cdbef Mon Sep 17 00:00:00 2001 From: AnnMarieW Date: Mon, 25 Jul 2022 15:01:13 -0700 Subject: [PATCH 1/3] revert 2126 until fixed --- dash/dash.py | 8 +------- tests/integration/test_pages_redirect_home.py | 2 ++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/dash/dash.py b/dash/dash.py index 2399c0e44c..80e52dc870 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -556,8 +556,7 @@ def _handle_error(_): self._add_url("_dash-update-component", self.dispatch, ["POST"]) self._add_url("_reload-hash", self.serve_reload_hash) self._add_url("_favicon.ico", self._serve_default_favicon) - if not self.use_pages: - self._add_url("", self.index) + self._add_url("", self.index) # catch-all for front-end routes, used by dcc.Location self._add_url("", self.index) @@ -2119,11 +2118,6 @@ def redirect(): fullname, create_redirect_function(page["relative_path"]), ) - # set "/" if not redirected - try: - self._add_url("", self.index) - except AssertionError: - pass def run_server(self, *args, **kwargs): """`run_server` is a deprecated alias of `run` and may be removed in a diff --git a/tests/integration/test_pages_redirect_home.py b/tests/integration/test_pages_redirect_home.py index 0654fd2ce2..0c738bb588 100644 --- a/tests/integration/test_pages_redirect_home.py +++ b/tests/integration/test_pages_redirect_home.py @@ -1,7 +1,9 @@ import dash +import pytest def test_pare001_redirect_home(dash_duo): + pytest.skip("Revisit later") app = dash.Dash(__name__, use_pages=True, pages_folder="") From 97c79b36782ea534b91a1fcb2a2515d129483c91 Mon Sep 17 00:00:00 2001 From: AnnMarieW Date: Tue, 26 Jul 2022 08:32:20 -0700 Subject: [PATCH 2/3] added changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dddf134358..53fe26eab5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [UNRELEASED] - [#2146](https://github.com/plotly/dash/pull/2146) Remove leftover debug console.log statement. +- [#2168](https://github.com/plotly/dash/pull/2168) Reverts [#2126](https://github.com/plotly/dash/pull/2126) until the new bugs introduced by that PR are fixed. ## [2.6.0] - 2022-07-14 From 982d7d14c6a14cefc271b05d04f8db40d9e14a5e Mon Sep 17 00:00:00 2001 From: Ann Marie Ward <72614349+AnnMarieW@users.noreply.github.com> Date: Thu, 28 Jul 2022 13:09:30 -0700 Subject: [PATCH 3/3] Update CHANGELOG.md Co-authored-by: Alex Johnson --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53fe26eab5..51dbc5084f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [UNRELEASED] - [#2146](https://github.com/plotly/dash/pull/2146) Remove leftover debug console.log statement. -- [#2168](https://github.com/plotly/dash/pull/2168) Reverts [#2126](https://github.com/plotly/dash/pull/2126) until the new bugs introduced by that PR are fixed. +- [#2168](https://github.com/plotly/dash/pull/2168) Reverts [#2126](https://github.com/plotly/dash/pull/2126) (supporting redirect from root when using pages) until the new bugs introduced by that PR are fixed. ## [2.6.0] - 2022-07-14