공부
[Django] check number of array by templates
승가비
2020. 10. 17. 20:20
728x90
{% if myarr|length > 1 %}
<!-- printing some html here -->
{% endif %}
Checking the number of elements in an array in a Django template
I want to see if the number of elements in an array in my Django template is greater than 1. Can i use the following syntax for doing that ? {% if {{myarr|length}} > 1 %}
728x90