只要能看到你想得到具体评论的作者:GenericObject(say Article)。
Djangos ORM offers following of relationships
So the solution would be:
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
User.objects.filter(comment_comments__content_type=ContentType.objects.get(app_label="articles", model="article"), comment_comments__object_pk="12").distinct()
如果您希望得到用户的帮助,则使用诸如价值观或价值观之类的东西。
User.objects.filter(comment_comments__content_type=ContentType.objects.get(app_label="articles", model="article"), comment_comments__object_pk="12").distinct().values_list( id )
希望会有所助益。