Created
July 8, 2011 16:28
-
-
Save daviferreira/1072198 to your computer and use it in GitHub Desktop.
How to change django's list_filter order
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% load i18n %} | |
<h3>{% blocktrans with title as filter_title %} By {{ filter_title }} {% endblocktrans %}</h3> | |
<ul> | |
<li {% if choices.0.selected %}class="selected"{% endif %}><a href="?"><strong>All</strong></a></li> | |
{% for choice in choices|dictsort:"display" %} | |
{% if choice.query_string != "?" %} | |
<li {% if choice.selected %}class="selected"{% endif %}><a href="{{ choice.query_string|iriencode }}">{{ choice.display }}</a></li> | |
{% endif %} | |
{% endfor %} | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do I use this?