I have 'version' in list_filter, and I want the latest version be after 'All' list item. In this case, how do I sort the list descending? (All, 3.6.99.108,3.6.99.107...)
相关问题
- Django __str__ returned non-string (type NoneType)
- Django & Amazon SES SMTP. Cannot send email
- Django check user group permissions
- Django restrict pages to certain users
- UnicodeEncodeError with attach_file on EmailMessag
相关文章
- Profiling Django with PyCharm
- Why doesn't Django enforce my unique_together
- MultiValueDictKeyError in Django admin
- Django/Heroku: FATAL: too many connections for rol
- Django is sooo slow? errno 32 broken pipe? dcramer
- Django: Replacement for the default ManyToMany Wid
- Upgrading transaction.commit_manually() to Django
- UnicodeEncodeError when saving ImageField containi
Define default ordering in model
Meta
class:If somehow it does not fulfill your purpose you can write your own custom list filter:
If you get following error
AttributeError: object has no attribute 'queryset'
then you are probably usingDjango 1.5+
use.get_queryset()
instead e.g.