[Fixed]-Django: path to static file is wrong in generated HTML

1👍

This issue is because the path in the static tag should be relative to the static directory. From the docs:

Uses the configured STATICFILES_STORAGE storage to create the full URL for the given relative path

You’re using an absolute path. Instead, you should use:

{% static "home_page/github_repos.js" %}

Note the omission of the leading forward slash.

Leave a comment