{% for room in rooms %} {{ room.short_name|default:room.name }}{% if not forloop.last %},{% endif %} {% endfor %}