Django: return one filtered object per foreign key
问题 Is it possible to return querysets that return only one object per foreign key? For instance, I want the to get the latest comments from django_comments, but I only want one comment (the latest comment) per object, i.e., only return the latest comment on an object and exclude all the past comments on that object. I guess this would be similar to a sql group_by on django_comments.content_type and django_comments.object_pk. ++ADDED INFO++ The end goal is to create a list of active comment