[Django]-How to iterate a queryset list in a django template

3👍

Django’s template language does of course accept lists!

Here is what the code in your template should look like:

{% for director in director_list %}
    {{ director }}
{% endfor %}

By the way: What you’re having here is a queryset (that gets evaluated to a list), not a list of querysets.

Leave a comment