Tweaked ordering of tags list

This commit is contained in:
Jeremy Stretch 2018-05-22 10:51:40 -04:00
parent b3350490e7
commit 601fb418b5

View File

@ -121,7 +121,7 @@ class ObjectListView(View):
# Construct queryset for tags list
if hasattr(model, 'tags'):
tags = model.tags.annotate(count=Count('taggit_taggeditem_items'))
tags = model.tags.annotate(count=Count('taggit_taggeditem_items')).order_by('-count', 'name')
else:
tags = None