In template for now I am using this:
{% for item in mydict|dictsortreversed:"column1" %}
But I have to sort data by two columns – is there any option in dictsort to do this?
Or any alternative to do this in template?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As you can see in the Django code, there is no support for this.
However, since Python sorts in a stable way. This is trivial to implement by sorting twice 🙂