{% for c in contracts %} {{ c.item.quantity }} {% if player.role == 'buyer' %}{{ c.cost_value }}{% else %}  {% endif %} {{ c.price }} {% endfor %}