{% load flatpages %}
{% get_flatpages as flatpages %}
<ul>
{% for page in flatpages %}
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
{% endfor %}
</ul>
The code above will render a simple unordered list containing flatpages. I would like to sort them using the “index” property of each flatpage, instead of alphabetically by the “url” property (as it is done by default).
You should try to write sort filter , or try to use
dictsort
Or write django assignment tag.