{% with ''|center:n as range %}
{% for _ in range %}
{{ forloop.counter }}
{% endfor %}
{% endwith %}
{% load my_filters %}
{% for i in 15|times %}
<li>Item</li>
{% endfor %}
@register.filter(name='times')
def times(number):
return range(number)