You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started building my app with JupyterDash. I put the assets in a folder called assets next to my notebook. CSS/JS in the assets folder show up in my dash app. If I move them and do app = JupyterDash(__name__, assets_url_path="/relative/path/") it doesn't work. Ditto for os.cwd()+"/relative/path/" and "/absolute/path/".
If i run the application with python dash_app.py, changing app = JupyterDash(...) to app = Dash(assets_url_path=...), None of the option above work. Only if I put an assets folder next to dash_app.py do I see my styles applied.
I think the documentation for assets_url_path could be improved a little -- it's only quickly mentioned here.
Yes, we could probably be clearer about that. I think you want assets_folder, which tells dash where the assets are on disk, instead of assets_url_path which just changes how the browser references them.
alexlenail
changed the title
[BUG] can't get assets_url_path to work
[DOC] Document assets_folder more widely
Jun 8, 2022
I started building my app with JupyterDash. I put the assets in a folder called
assets
next to my notebook. CSS/JS in the assets folder show up in my dash app. If I move them and doapp = JupyterDash(__name__, assets_url_path="/relative/path/")
it doesn't work. Ditto foros.cwd()+"/relative/path/"
and"/absolute/path/"
.If i run the application with
python dash_app.py
, changingapp = JupyterDash(...)
toapp = Dash(assets_url_path=...)
, None of the option above work. Only if I put anassets
folder next todash_app.py
do I see my styles applied.I think the documentation for
assets_url_path
could be improved a little -- it's only quickly mentioned here.The text was updated successfully, but these errors were encountered: