Rocky Holms Rocky Holms - 11 months ago 60
Python Question

Top 7 most common tags Taggit

def most_common(self):
return self.get_queryset().annotate(

How would I edit this to only view the top 7 tags. This is a function from taggit and I would only like to see only 7. thanks.

Answer Source

How about most_common()[:7]?… – ozgur

This is the correct asnwer, thanks ozgur