Reputation: 108
I'd like to check if there is a next value inside my for loop; If so set a comma if not do nothing. Is there something like an {% ifnext %}?
Upvotes: 1
Views: 174
Reputation: 108
Quick research took me to the following solution. Assuming that we are in a forloop one could use:
{% if not forloop.last %},{% else %}{% endif %}
Upvotes: 1