我的rango_template_tags.py文件: -
from django import template
from rango.models import Category
register = template.Library()
@register.inclusion_tag('rango/cats.html')
def get_category_list(cat=None):
return {'cats':Category.objects.all(),'act_cat': cat}
我的base.html文件: -
{% block sidebar_block %}
{% get_category_list category %}
{% endblock %}
我收到错误: -
TemplateSyntaxError at /
'get_category_list' received too many positional arguments
这是什么错误?