Skip to content

Commit

Permalink
Merge pull request #676 from plotly/add-enable-dev-tools
Browse files Browse the repository at this point in the history
✨ add dev_tools_ui in config
  • Loading branch information
byronz authored Apr 2, 2019
2 parents 1e67f3a + 791bae0 commit 8709143
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Unreleased

### Added

- add `dev_tools_ui` in `<script id="_dash-config" type="application/json">`,
so renderer can know if it should enable the UI. [#676](https://github.com/plotly/dash/pull/676)


## [0.40.0] - 2019-03-25
### Changed
- Bumped dash-core-components version from 0.44.0 to [0.45.0](https://github.com/plotly/dash-core-components/blob/master/CHANGELOG.md#0450---2019-03-25)
Expand Down
8 changes: 6 additions & 2 deletions dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ def _handle_error(_):
'hot_reload': False,
'hot_reload_interval': 3000,
'hot_reload_watch_interval': 0.5,
'hot_reload_max_retry': 8
'hot_reload_max_retry': 8,
'dev_tools_ui': False,
})

# add a handler for components suites errors to return 404
Expand Down Expand Up @@ -328,7 +329,8 @@ def serve_layout(self):
def _config(self):
config = {
'url_base_pathname': self.url_base_pathname,
'requests_pathname_prefix': self.config['requests_pathname_prefix']
'requests_pathname_prefix': self.config.requests_pathname_prefix,
'dev_tools_ui': self._dev_tools.dev_tools_ui,
}
if self._dev_tools.hot_reload:
config['hot_reload'] = {
Expand Down Expand Up @@ -1227,6 +1229,8 @@ def enable_dev_tools(self,
debug = debug or _configs.get_config('debug', None, env, debug,
is_bool=True)

self._dev_tools.dev_tools_ui = debug

self._dev_tools['serve_dev_bundles'] = _configs.get_config(
'serve_dev_bundles', dev_tools_serve_dev_bundles, env,
default=debug,
Expand Down

0 comments on commit 8709143

Please sign in to comment.