6
{% load staticfiles %}
is only loading the code for template tag library staticfiles
. Itβs not loading all static files into the django template. The template tag static
is part of the staticfiles
template tag library, so django template needs to know where is the code for static
coming from.
You could call load
on any template tag, even your custom ones. Itβs like the pseudo code from staticfiles import static
in python.
Please look at django doc for details.
Source:stackexchange.com