I was reading some code in the django tutorial and i found this
<ul>
{% for athlete in athlete_list %}
<li>{{ athlete.name }}</li>
{% endfor %}
</ul>
what is athlete?, where can I find mor information about how to use this?
I searched for list, but they seem to have restricted functions such as append and index.
athlete_listis a context variable that has been passed to the template.athleteis an element ofathlete_list. In this case, it looks likeathleteis a model object with anameproperty. In which case,athlete_listis probably anathletequery set, or list of objects.Have a look at the Django template tag reference for more information.