I started learning django by creating a small site some days ago. The problem is that I can`t make the plugin work properly. The plugin is a small bundle of css and js. I put it into static directory and wrote in settings.file
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
Scripts and css work only on the main.html template where I put such lines
<link rel="stylesheet" href="static/btn/css/bvi.min.css" type="text/css">
<script src="{% static 'btn/js/js.cookie.js' %}"></script>
<script src="{% static 'btn/js/bvi-init.js' %}"></script>
<script src="{% static 'btn/js/bvi.min.js' %}"></script>
But when I go to the other page (news_main.html), plugin css don`t work there. News_main.html has such lines
{% extends 'main.html' %}
{% block title %}
News Page
{% endblock %}
When downloading this page Django server says
[20/Jun/2020 08:48:32] “GET /news/ HTTP/1.1” 200 3136
Not Found: /news/static/btn/css/bvi.min.css
[20/Jun/2020 08:48:32] “GET /news/static/btn/css/bvi.min.css HTTP/1.1” 404 2289
News_main.html looks similar to main.html when downloading but without plugin css.
I guess there is something wrong with the path of css file.
P.S. News dir is django app.