Django Static files
1. Create a new folder “static” in the root of the main project.
Same level as the “templates” directory.
2. Add this code to your base template file (__base.html).
{% load staticfiles %}
3. Use this to load the files.
<!-- CSS CUSTOM -->
<link rel=”stylesheet” href=”{% static ‘css/styles.css’ %}”>
4. Add this to your settings.py
file.
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]