question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

append_script and serve_locally=True

See original GitHub issue

To 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:open
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sdementencommented, Feb 7, 2021

Maybe still a need to update the docs around the use of append_script?

0reactions
GibbsConsultingcommented, Feb 7, 2021

@sdementen can this issue now be closed?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found