0

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,

André
  • 24,706
  • 43
  • 121
  • 178

1 Answers1

0

View:

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

Template:

{{ item.content_object }}
André
  • 24,706
  • 43
  • 121
  • 178