Django - How to query the Django Comments Framework

111 views Asked by At

I'm using the Django Comments Framework.

I need to query all the comments of a certain Content Type. How can I do that?

In the view I'm doing this query:

from django.contrib.comments.models import Comment

comments = Comment.objects.all().order_by('-submit_date')

Now, on the view how can I query the related object information(certain Content Type)?

Any clues?

Best Regards,

1

There are 1 answers

0
André On

View:

comentarios = Comment.objects.filter(content_type=11).order_by('-submit_date')

Template:

{{ item.content_object }}