{% for data in selected_tags %} {{data.tag|safe}} x {% endfor %} {% for data in available_tags %} {{data.tag|safe}}{{data.total}} {% endfor %}