{% for tag in tags|slice:":2" %} {{ tag.key }} {% endfor %} {% if tags.count > 2 %} +{{ tags.count|add:"-2" }} {% endif %}