Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document assets_folder more widely #2022

Open
alexlenail opened this issue Apr 21, 2022 · 3 comments
Open

Document assets_folder more widely #2022

alexlenail opened this issue Apr 21, 2022 · 3 comments
Assignees
Labels
documentation written for humans feature something new P2 considered for next cycle P3 backlog

Comments

@alexlenail
Copy link

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.

dash                              2.0.0
dash-bio                          0.7.1
dash-bootstrap-components         1.0.0
dash-core-components              2.0.0
dash-html-components              2.0.0
dash-renderer                     1.9.1
dash-table                        5.0.0
jupyter-dash                      0.4.0
@alexcjohnson
Copy link
Collaborator

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 alexlenail changed the title [BUG] can't get assets_url_path to work [DOC] Document assets_folder more widely Jun 8, 2022
@alexlenail
Copy link
Author

@alexcjohnson this resolved my issue -- would recommend slightly more documentation about it.

@alexcjohnson
Copy link
Collaborator

cc @LiamConnors

@gvwilson gvwilson added the P3 backlog label Aug 13, 2024
@gvwilson gvwilson changed the title [DOC] Document assets_folder more widely Document assets_folder more widely Aug 13, 2024
@gvwilson gvwilson added documentation written for humans feature something new P2 considered for next cycle labels Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation written for humans feature something new P2 considered for next cycle P3 backlog
Projects
None yet
Development

No branches or pull requests

4 participants