In my views I have a dict list such as
data = [{'name': 'Abe', 'seq': [4, 3]}, {'name': 'All names', 'seq': [9, 8]}, {'name': 'Mike', 'seq': [11, 2]}]
In my template I sorted them with:
{{ data|dictsort:"name" }}
I’d like to have {'name': 'All names', 'seq': [9, 8]} in the top of the list and keep the other sorted data items. How can I do this?
Do the sorting in the view, using a custom key function.