Reputation: 3217
In django admin change list template there is a block:
{% 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 %}
I would like to know what does {% result_list cl %}
do, i.e. what does cl
mean? I couldn't find it in docs.
Upvotes: 7
Views: 4161
Reputation: 43320
Its a context variable name being used in an inclusion tag
result_list
's source code comment states that it "Displays the headers and data list together".
Upvotes: 6
Reputation: 599778
cl
isn't a general thing; it's the name of a variable, so it wouldn't be in the documentation. In this particular case, it's a variable holding a Changelist object, but only because that is what is passed in to the template context.
Upvotes: 3
Reputation: 5993
It's a Changelist
: the list of your model instances. Django uses it to handle the filtering and pagination tasks.
Upvotes: 4