The django.contrib.staticfiles middleware provides the STATIC variable to templates. If we use this template in url structures, we gain the ability to change our static rendering url anytime we wish.
It's a simple refactor that makes a lot of code cleaner.
The
django.contrib.staticfiles
middleware provides the STATIC variable to templates. If we use this template in url structures, we gain the ability to change our static rendering url anytime we wish.It's a simple refactor that makes a lot of code cleaner.