I have a problem that my .css file doesn't apply on my .html file in Django. But when I, for example, type . some class name from the .html file, pycharm offers me to finish the class name. So, I think its linked right.
Anyway, I put in my settings file:
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
Run python manage.py collectstatic succesfuly and added my .css file to .html with command:
{% load staticfiles %}
<link rel="stylesheet" type="text/css" href="{% static 'base.css' %}"/>
Inside of my project I have something like this:
-website
-static
-admin (generated when I run the command above)
-images
-base.css
-templates
-navbar.html
-base.html
-app1
-app2
-etc
For testing purpose I just put simple div in the head section of the .html file:
<div class="example">jvhgbhjgf</div>
And in .css file:
.example { background-color: red; border-radius: 15px;}