hello again. thanks for all the help that everyone has offered me here. I have a generic django application called categories and it serves to provide categories for various apps suchas a weblog or an articles application. So a weblog and article app both have a M2M relation to the catergories app. what I am wanting to do is count how many occurrences of a category are found for a particular application. So if my weblog had a category called politics, it would count how many weblogs have a relation with that. Is this possible with out putting a category_counter field in? I notice that there is a .count() method but not really sure how to apply it to what I am attempting to do.
-model looks like: name slug content_type -my call: test = Category.objects.filter(content_type__app_label__exact='weblog') how would I count the number of occurrences of a category called politics? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

