django在前端模板中使用{% load staticfiles %}
会报错,报错信息如下:
'staticfiles' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_urls
cache
i18n
l10n
log
static
tz
修改前端模板为{% load static %}
因为在django3.x
中这部分做了修改,对于:
{% load staticfiles %}
{% load static from staticfiles %}
{% load admin_static %}
都统一改为{% load static %}