-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I believe QuerySets have a .count() method.
Luke luke.seelenbin...@gmail.com When ideas fail wrote: > Hi, I was wondering what is the simpliest way to count the number of > objects returned in a QuerySet? > > Basically i have a blog and i want to count the number of comment > relating to each post and display it, the blog posts are shown on a > seperate page to the comments but i guess you would still have to > create the query set in the posts view so that you can count the > results. > > Thanks > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkp5ojMACgkQXQrGVCncjPxzcACgpGprrgc/o00WHsJ3XdvZmeFD wZwAnRczHExrEqTDHBNMvCu8BcES3jBI =apvd -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---