Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 8e0abb1

Browse files
authored
Merge pull request #76 from plotly/config-edit-fix
Config edit fix
2 parents 351cb7c + a459279 commit 8e0abb1

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,16 @@
66
/build/
77
.ipynb_checkpoints
88
/extensions/jupyterlab/README.md
9+
__pycache__/
10+
*.py[cod]
11+
*$py.class
12+
.mypy_cache/
13+
.DS_Store
14+
.env
15+
.venv
16+
env/
17+
venv/
18+
ENV/
19+
env.bak/
20+
venv.bak/
21+
vv

jupyter_dash/jupyter_app.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,10 @@ def run_server(
228228
requests_pathname_prefix = requests_pathname_prefix.format(port=port)
229229
else:
230230
requests_pathname_prefix = '/'
231-
self.config.update({'requests_pathname_prefix': requests_pathname_prefix})
231+
# low-level setter to circumvent Dash's config locking
232+
# normally it's unsafe to alter requests_pathname_prefix this late, but
233+
# Jupyter needs some unusual behavior.
234+
dict.__setitem__(self.config, "requests_pathname_prefix", requests_pathname_prefix)
232235

233236
# Compute server_url url
234237
if self.server_url is None:

0 commit comments

Comments
 (0)