I have a list in my Django template. I want to do something only if the size of the list is greater than zero.
I have tried myList|length and m
myList|length
m
You can try with:
{% if theList.object_list.count > 0 %} blah, blah... {% else %} blah, blah.... {% endif %}