diff --git a/CHANGELOG.md b/CHANGELOG.md index 7431bca54d..f491347f10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [UNRELEASED] ### Fixed - +- [#2102](https://github.com/plotly/dash/pull/2102) Fix bug as reported in [dash-labs #113](https://github.com/plotly/dash-labs/issues/113) where files starting with `.` were not excluded when building `dash.page_registry`. - [#2098](https://github.com/plotly/dash/pull/2098) Accept HTTP code 400 as well as 401 for JWT expiry - [#2097](https://github.com/plotly/dash/pull/2097) Fix bug [#2095](https://github.com/plotly/dash/issues/2095) with TypeScript compiler and `React.FC` empty valueDeclaration error & support empty props components. diff --git a/dash/_pages.py b/dash/_pages.py index b3002662ca..bf09dd2a4c 100644 --- a/dash/_pages.py +++ b/dash/_pages.py @@ -199,9 +199,7 @@ def register_page( APNG, AVIF, GIF, JPEG, JPG, PNG, SVG, WebP. - `image_url`: - This will use the exact image url provided when sharing on social media. - This is appealing when the image you want to share is hosted on a CDN. - Using this attribute overrides the image attribute. + Overrides the image property and sets the `` meta tag to the provided image URL. - `redirect_from`: A list of paths that should redirect to this page. diff --git a/dash/dash.py b/dash/dash.py index fb72aeadb2..b0c597ec1a 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -2167,7 +2167,11 @@ def _import_layouts_from_pages(self): for (root, _, files) in os.walk(walk_dir): for file in files: - if file.startswith("_") or not file.endswith(".py"): + if ( + file.startswith("_") + or file.startswith(".") + or not file.endswith(".py") + ): continue with open(os.path.join(root, file), encoding="utf-8") as f: content = f.read() diff --git a/tests/integration/multi_page/pages/.no_import.py b/tests/integration/multi_page/pages/.no_import.py new file mode 100644 index 0000000000..22353e85d8 --- /dev/null +++ b/tests/integration/multi_page/pages/.no_import.py @@ -0,0 +1 @@ +raise Exception("files starting with . should not be imported") diff --git a/tests/integration/multi_page/pages/_no_import.py b/tests/integration/multi_page/pages/_no_import.py new file mode 100644 index 0000000000..5877f359ad --- /dev/null +++ b/tests/integration/multi_page/pages/_no_import.py @@ -0,0 +1 @@ +raise Exception("files starting with _ should not be imported") diff --git a/usage-pages/pages_error/__init__.py b/usage-pages/pages_error/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/usage-pages/pages_error/page1.py b/usage-pages/pages_error/page1.py deleted file mode 100644 index 16c810063c..0000000000 --- a/usage-pages/pages_error/page1.py +++ /dev/null @@ -1,6 +0,0 @@ -import dash - - -dash.register_page(__name__) - -# page with no layout