Question : .comments.all order django
Answered by : arfaoui-mehdi
{% for comment in comment_list reversed %}
Source : https://stackoverflow.com/questions/11588573/reorder-comments-from-django-comments-framework-in-reverse-order | Last Update : Sat, 25 Sep 21
Question : .comments.all order django
Answered by : repulsive-reindeer-saiccqu0bs2h
from django.db.models import Count
posts = Post.objects.annotate(num_comments=Count('comment')).order_by('-num_comments')
Source : https://devarama.com/questions/33256096/Django-Order-by-the-amount-of-comments | Last Update : Thu, 03 Mar 22