Simple question. I have a list in my template and want to output the length of the list. Do I have to calculate this in my view and hand it over via my context?
{% if your_list %}
{{ your_list|length }}
{% endif %}
Just remember that if your_list is a property it will be tigger on this line, so if you make dynamic list that is created each time you ask for it and you want to for later you will trigger it twice;