def get_queryset(self): from django.db.models import Count queryset = Book.objects.annotate(Count('authors')) return queryset.
確定! 回上一頁