{% load staticfiles %} {% with ''|center:5 as range %} {% for number in range %} {% if score is not None and score >= forloop.counter %} {% else %} {% endif %} {% endfor %} {% endwith %}