我检查过自己的 template tags 了,并没有漏过了步骤 {% load blog_tags %}
register = template.Library()
@register.simple_tag
html 模板上并没有任何的语法问题,上网百度搜索这个错误,根本找不到解决办法
html 模板上的一些片段
50 {% archives as date_list %}
51 <div class="list-group">
52 <a href="#" class="list-group-item list-group-item-action active">
53 归档
54 </a> {% for date in date_list %}
55 <a href="#" class="list-group-item list-group-item-action">
56 <i class="fa fa-calendar-o"></i><span> {{ date.year }} 年 {{ date.month }} 月</span>
57 </a>
58 {% empty %} 暂无归档! {% endfor %}
59 </div>

返回的是这个错误
django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 50: 'archives', expected 'endblock'. Did you forget to register or load this tag?