[Django]-Using static file in extended template in Django

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.

Leave a comment