{% load filters %}
{% with stages_count=stages|length %} {% with barwidth=100|divide:stages_count current_rendered=False %} {% for stage in stages %} {% if current_rendered == False %}
{{ stage.title }}
{% endif %} {% if stage.id == post.stage.id %}{% set current_rendered = True %}{% endif %} {% endfor %} {% endwith %} {% endwith %}