I'm trying to create an iteration like the a $i==0; $i++;
from PHP in Django, based on a condition.
{% for item in event.products %}
{% if item.category = "Treat" %}
Now - I want to be able to tell how many times has this condition been met (category = treat) and how to stop the for loop after 2 items that match that loop.
Thanks!