title: django many to many field - programmatically retrieve relations
body: <p>I have been working on a model for tags and am trying to avoid using contenttypes. I have couple questions related to ManyToManyField in django. </p>
  
  <p>I have the following model</p>
  
  <p>taggables/models.py</p>
  
  <pre><code>class Tag(models.Model):
      tag_statuses = (
          (u'P', _('Pending approval')),
          (u'A', _('Approved')),
      )
      slug             = models.SlugField()
  
      created_at      = models.DateTimeField(null=True, blank=True)
      created_by      = models.ForeignKey(User, related_name='tagged_item_created_by')
      status          = models.CharField(max_length=20, choices=tag_statuses)
      site            = models.ForeignKey(Site, default=settings.SITE_ID, related_name='tagged_item_site')
  
  
      def __unicode__(self):
          return self.slug
  
  
  class TagI18n(models.Model):
      tag                 = models.CharField(max_length=100)
      descriptor          = models.TextField(null=True, blank=True)
  
      # i18n properties
      item                = models.ForeignKey(Tag)
      language            = models.CharField(max_length=6, choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE)
  
      class Meta:
          unique_together = (("language", "item"))
      def __unicode__(self):
          return self.tag
  </code></pre>
  
  <p>I also have different apps around my project that uses tag model as many to many field. such as events for example</p>
  
  <p>evetns/models.py</p>
  
  <pre><code>class Item(models.Model):
      event_status_list = (
          (u'P', _('Pending approval')),
          (u'A', _('Approved')),
          (u'R', _('Rejected')),
          (u'S', _('Spam')),
      )
  
      published_at        = models.DateTimeField(null=True, blank=True)
      published_by        = models.ForeignKey(User, null=True, blank=True, related_name='item_published_by')
      updated_by          = models.ForeignKey(User, null=True, blank=True, related_name='item_updated_by')
      updated_at          = models.DateTimeField(null=True, blank=True)
  
      site                = models.ForeignKey(Site, default=settings.SITE_ID, related_name='events_item_site')
  
      event_slug          = models.SlugField(null=True, blank=True)
  
      # event timing
      event_start_date    = models.DateField()
      event_start_time    = models.TimeField(null=True, blank=True)
      event_end_date      = models.DateField()
      event_end_time      = models.TimeField(null=True, blank=True)
  
  
      event_recurrent     = models.BooleanField(default=False)
      event_status        = models.CharField(max_length=20, choices=event_status_list, default=u'P')
  
      # relations
      media        = models.ManyToManyField(ImageFile, null=True, blank=True)
      comments     = models.ManyToManyField(Comment, null=True, blank=True)
      votes        = models.ManyToManyField(Vote, null=True, blank=True)
      tags         = models.ManyToManyField(Tag, null=True, blank=True)
      audience     = models.ManyToManyField(Audience, null=True, blank=True)
  </code></pre>
  
  <p>Now what am trying to do here is run a query to programmatically retrieve all the related models to Tag and then count how many a times a tag was used. Am sure I can do that with contenttypes (generic types) but I don't know how it will perform under heavy usage that's why I wanted to do the many to many fields.</p>