Invalid block tag: 'static'

南笙酒味 提交于 2019-12-03 23:51:09

Make sure that 'django.contrib.staticfiles' is included in your INSTALLED_APPS.

this is number one in this checklist

This worked for me

{% load staticfiles %}

include {% load static %} just above section in html file, that will help your HTML file to load your css or js files

Александр Коньшин

add {% load static %} at the top of html file, under the DOCTYPE html line

{% load static %} or {% load staticfiles %}

both will work. Just be sure you use equal amount of spaces between opening and closing of '{' and '%'.

It's OK now. I resolved it myself. I'm sorry. I confused two similar html files. The one I put on here (header.html) was right but header_authenticated.html was wrong.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!