Which is the most efficient, 'proper' way to get a count on a query
set?

t_results = Track.objects.filter(query).order_by('title')
count = t_results.count()  # and pass 'count' to the template.

or, in the template,

<p>Your search returned {{t_results|length}} track{{t_results|
pluralize}}.</p>

Thanks,
Dan J.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to