{% for ak in aks.all %} {% if forloop.counter0 > 0 %} ,  {% endif %} {{ ak }} {% empty %} - {% endfor %}