Answers for "check if queryset is empty django template"

0

check if queryset is empty django template

<ul>
{% for athlete in athlete_list %}
    <li>{{ athlete.name }}</li>
{% empty %}
    <li>Sorry, no athletes in this list.</li>
{% endfor %}
</ul>
Posted by: Guest on September-28-2020

Code answers related to "check if queryset is empty django template"

Python Answers by Framework

Browse Popular Code Answers by Language