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

Added comment number 5 on Including Local CSS and JavaScript #187

Merged
merged 1 commit into from Sep 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions tutorial/external_css_and_js.py
Expand Up @@ -177,6 +177,14 @@

4 - Your custom CSS will be included _after_ the Dash component CSS

5 - It is recommended to add `__name__` to the dash init to ensure the resources
in the assets folder are loaded, eg: `app = dash.Dash(__name__, meta_tags=[...])`.
When you run your application through some other command line (like the
flask command or gunicorn/waitress) instead of it’s module name
(eg: `python app.py`), the `__main__` module is no longer located where `app.py` is
and now refer to some place like `/venv/lib/site-packages/flask`. Giving
`__name__` explicitly will always give the right path to the assets folder.

***

## Embedding Images in Your Dash Apps
Expand Down