Django:在模板标签中cl是什么意思?

dsa*_*laj 5 django django-templates templatetags

在Django管理员更改列表模板中,有一个块:

  {% block result_list %}
      {% if action_form and actions_on_top and cl.show_admin_actions %}{% admin_actions %}{% endif %}
      {% result_list cl %}
      {% if action_form and actions_on_bottom and cl.show_admin_actions %}{% admin_actions %}{% endif %}
  {% endblock %}
Run Code Online (Sandbox Code Playgroud)

我想知道{% result_list cl %}该做什么,即什么cl意思?我在文档中找不到它。

Say*_*yse 5

它是在包含标签中使用的上下文变量名称

result_list源代码注释指出它“一起显示标题和数据列表”。

  • 包含标签链接已失效,这是当前页面的链接:[包含标签](https://docs.djangoproject.com/en/3.0/howto/custom-template-tags/) (2认同)