{% load get_range %} {% if cost.any > 0 or cost.converted == 0 %} {{ cost.any }} {% endif %} {% for type, mana in cost.mana.mana.items %} {% for i in mana|get_range %} {% endfor %} {% endfor %}