I need to define a Meeting model which includes an organiser and a number of participants. All participants are derived from the standard User in auth module.
from django.db import models
from django.contrib.auth.models import User
class Meeting(models.Model):
organizer=models.ForeignKey(User)
participants=models.ManyToManyField(User)
However, when running syncdb, the I got the following error
Error: One or more models did not validate: hub.meeting: Accessor for field 'organizer' clashes with related m2m field 'User.meeting_set'. Add a related_name argument to the definition for 'organizer'. hub.meeting: Accessor for m2m field 'participants' clashes with related field 'User.meeting_set'. Add a related_name argument to the definition for 'participants'.
Can anyone help me to solve this?