title: django: deleting a model referenced as ManyToManyField
body: <p>I have a model:</p>
  
  <pre><code>class picture(models.Model):
      name = models.CharField(null=False, blank=False, max_length=128)
      collections = models.ManyToManyField('collection', null=False, blank=False)
      sizes = models.ManyToManyField('picture_size', null=False, blank=False)
      papers = models.ManyToManyField('picture_paper', null=False, blank=False)
      base_price = models.DecimalField(decimal_places=2, null=False, blank=False, default=2000, max_digits=10)
      img_icon = models.FileField(blank=False, null=False, upload_to='pic_icons')
      img_large = models.FileField(blank=False, null=False, upload_to='pic_large')
      img_huge = models.FileField(blank=False, null=False, upload_to='pic_huge')
      is_active = models.BooleanField(blank=False, null=False, default=True)
  </code></pre>
  
  <p>and picture_paper:</p>
  
  <pre><code>class picture_paper(models.Model):
      name = models.CharField(null=False, blank=False, max_length=128)
      price_per_ssm = models.DecimalField(null=False, blank=False, decimal_places=2, max_digits=10)
      is_active = models.BooleanField(null=False, blank=False, default=True)
  </code></pre>
  
  <p>I register them models in admin and can create a picture_paper but can't delete it:</p>
  
  <blockquote>
    <p>(1054, "Unknown column 'picture_paper_id' in 'where clause'")</p>
  </blockquote>
  
  <p>The SQL it is building is this:</p>
  
  <pre><code>'DELETE FROM `core_picture_papers` WHERE `picture_paper_id` IN (%s)'
  </code></pre>
  
  <p>explain core_picture_papers:</p>
  
  <pre><code>id  int(11) NO  PRI     auto_increment
  picture_id  int(11) NO  MUL     
  paper_id    int(11) NO  MUL 
  </code></pre>
  
  <p>Is my model setup totally wrong (I'm trying to build a dictionary of paper kinds and hook them to pictures - a picture can relate to a few sizes or one etc)? Or there is something I'm missing?    </p>