How do I write a numeric for loop in a Django template? I mean something like
for
for i = 1 to n
For those who are looking to simple answer, just needing to display an amount of values, let say 3 from 100 posts for example just add {% for post in posts|slice:"3" %} and loop it normally and only 3 posts will be added.
{% for post in posts|slice:"3" %}