def popular_tags_for_model(model, count=10):
 content_type = ContentType.objects.get_for_model(model)
 return Tag.objects.filter(taggit_taggeditem_items__content_type=content_type).annotate(item_count=Count(u'taggit_taggeditem_items')).order_by(u'-item_count')[:count]

def popular_tags_for_model ( model , count = 10 ) : content_type = ContentType . objects . get_for_model ( model ) return Tag . objects . filter ( taggit_taggeditem_items__content_type = content_type ) . annotate ( item_count = Count ( u'taggit_taggeditem_items' ) ) . order_by ( u'-item_count' ) [ : count ]
return a queryset of the most frequently used tags used on this model class .