Answer the question
In order to leave comments, you need to log in
How to sort in Jinja?
Why doesn't the design work? Invalid filter: 'sort'
{% for p in movie.list|sort(attribute='time') %}
{{movie.list}}
<button type="button" class="btn btn-primary">{{ p.time }}</button>
{% endfor %}
Answer the question
In order to leave comments, you need to log in
Found the answer. This is a dictionary.
{% for p in movie.list|dictsort:"time" %}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question