On Sat, Apr 18, 2009 at 6:40 PM, Bastien <bastien.roche...@gmail.com> wrote:
> > Hi, > > I try to find the way to display the recent comments for a given site, > regardless of app / model but the doc doesn't show much, anybody has > it already? thanks > > > Comment is just a model so you can interact and preform queries with it the same way you would with any model: from django,contrib.comments.models import Comment Comment.objects.all().filter(site=1).order_by('-submit_date')[:10] Would give you the 10 most recent comments on site '1'. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---