1👍
Look at the variables available in the for loop. There is one called forloop.first which may be a better choice than checking if s = 1.
Documentation
https://docs.djangoproject.com/en/1.10/ref/templates/builtins/#for
There is a similar discussion at:
Django {% if forloop.first %} question
Can you show what your desired output looks like?
👤AMG
Source:stackexchange.com