append_script and serve_locally=True
See original GitHub issueTo add a local script, I am using
app.scripts.append_script(dict(external_url=app.get_asset_static_url("script.js")))
with serve_locally=True and I get the warning
...\dash\resources.py:60: UserWarning: You have set your config to `serve_locally=True` but A local version of /static/dpd/assets/simulation/dashapps/script.js is not available.
If you added this file with `app.scripts.append_script` or `app.css.append_css`, use `external_scripts` or `external_stylesheets` instead.
with the file not being included in the html via the {% plotly_footer %}
.
It appears that the append_script approach is to be replaced by the use of external_scripts in Dash. Does django-plotly-dash support this ?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
How to append <script></script> in JavaScript? - Stack Overflow
I need to use appendChild() or jQuey's append() to append some <script> tag stuff into the document. From what I can tell, this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Maybe still a need to update the docs around the use of append_script?
@sdementen can this issue now be closed?