As it written here, the default context variable for ListView
is objects_list
So in template it can be accessed as following:
{% for obj in objects_list%}
{{obj.some_field}}
{% endfor %}
Also, it can be set manually with context_object_name
parameter (as in your example):
class GetStudentQueryHandler(ListView):
# ...
context_object_name = 'studentinfo'
# ...
and in template:
{% for obj in studentinfo %}
{{obj.some_field}}
{% endfor %}
To access the additonally added field can_show_distribute
from the context in the template:
{{ can_show_distribute }}