From d22a8cf459ad4519a5b3df753945f332e83143c4 Mon Sep 17 00:00:00 2001 From: Philippe Duval Date: Mon, 20 Aug 2018 11:49:15 -0400 Subject: [PATCH 1/2] Only create an assets blueprint if it's not registered. --- dash/dash.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dash/dash.py b/dash/dash.py index 0a2508b5f9..4cfd0d4684 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -104,10 +104,11 @@ def __init__( # allow users to supply their own flask server self.server = server or Flask(name, static_folder=static_folder) - self.server.register_blueprint( - flask.Blueprint('assets', 'assets', - static_folder=self._assets_folder, - static_url_path=assets_url_path)) + if 'assets' not in self.server.blueprints: + self.server.register_blueprint( + flask.Blueprint('assets', 'assets', + static_folder=self._assets_folder, + static_url_path=assets_url_path)) env_configs = _configs.env_configs() From c51f2c366ccf51fa238e26dbc8095edd4f3151c5 Mon Sep 17 00:00:00 2001 From: Philippe Duval Date: Mon, 27 Aug 2018 10:51:58 -0400 Subject: [PATCH 2/2] Update version and changelog. --- CHANGELOG.md | 4 ++++ dash/version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fcf7183bd..e96b0267e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.26.2 - 2018-08-26 +## Fixed +- Only create the assets blueprint once for app that provide the same flask instance to multiple dash instance. [#343](https://github.com/plotly/dash/pull/343) + ## 0.26.1 - 2018-08-26 ## Fixed - Fix bug in `_validate_layout` which would not let a user set `app.layout` to be a function that returns a layout [(fixes #334)](https://github.com/plotly/dash/issues/334). [#336](https://github.com/plotly/dash/pull/336) diff --git a/dash/version.py b/dash/version.py index f96e1c6bed..c42375ce97 100644 --- a/dash/version.py +++ b/dash/version.py @@ -1 +1 @@ -__version__ = '0.26.1' +__version__ = '0.26.2'