.comments.
from django.db.models import Count
posts = Post.objects.annotate(num_comments=Count('comment')).order_by('-num_comments')
Repulsive Reindeer
from django.db.models import Count
posts = Post.objects.annotate(num_comments=Count('comment')).order_by('-num_comments')
{% for comment in comment_list reversed %}