Django User M2M relationship
- by Antonio
When trying to syncdb with the following models:
class Contact(models.Model):
user_from = models.ForeignKey(User,related_name='from_user')
user_to = models.ForeignKey(User, related_name='to_user')
class Meta:
unique_together = (('user_from', 'user_to'),)
User.add_to_class('following', models.ManyToManyField('self',…