I have a basic question, in the Django template language, how can you determine if you are at the last iteration of a loop in a for loop?
for
You would use forloop.last . For example:
forloop.last
<ul> {% for item in menu_items %} <li{% if forloop.last %} class='last'{% endif %}>{{ item }}</li> {% endfor %} </ul>
{{forloop.last}}