title: Django ManyToManyField Custom Structure
body: <p>Is it possible to manually specify the structure of the table created by a <code>ManyToManyField</code> in Django?</p>
  
  <p>I'm trying to integrate Django with an existing database, and want to be able to use the data in the existing table. It's not possible to alter the structure of the database as this would break the original app that uses the DB.</p>
  
  <p>If it helps, here are the table definitions:</p>
  
  <pre><code>class People(models.Model):
      person_id  = models.CharField(db_column='PersonId', primary_key=True)
      first_name = models.CharField(db_column='FirstName')
      ...
  
  class PersonCats(models.Model):
      category_id  = models.IntegerField(db_column='PersonCatId', primary_key=True)
      title = models.CharField(db_column='Title', max_length=50)
      ...
  
  class PersonCatPeople(models.Model):   #No primary key on this table
      person_cat_id = models.IntegerField(db_column='PersonCatId)
      person_id     = models.CharField(db_column='PersonId')
      ...
  </code></pre>