As of version 2.6, Jinja2’s built-in sort filter allows you to specify an attribute to sort by:
{% for movie in movie_list|sort(attribute="rating") %}
See http://jinja.pocoo.org/docs/templates/#sort
As of version 2.6, Jinja2’s built-in sort filter allows you to specify an attribute to sort by:
{% for movie in movie_list|sort(attribute="rating") %}
See http://jinja.pocoo.org/docs/templates/#sort