In the Bootstrap slider, the first element has the value "active", how to check and add this value to the html code for the queryset, if element is first.
Example (which is not working):
{% for obj in query %}
<div class="carousel-item {% if query|first %}active{% endif %}">
[...]
</div>
{% endfor %}
*this gives activity for all items, not just the first. Expected result is only for first.