Это то, чего я хочу достичь:
class Event(Model):
attendees = ManyToManyField(User, through='Involvement', related_name='attended_events')
interested_users = ManyToManyField(User, through='Involvement', related_name='interested_in_events')
organizers = ManyToManyField(User, through='Involvement', related_name='organized_events')
class Involvement(Model):
event = ForeignKey(Event, CASCADE)
user = ForeignKey(User, CASCADE)
involvement = CharField(choices=(('INTERESTED', 'Interested'), ('ATTENDED', 'Attended'), ('ORGANIZED', 'Organized')))
Я получаю ошибку:
The model has three identical many-to-many relations through the intermediate model 'app.ActivityInvolvement'.
Я знаю, limit_choices_to
не работает на ManyToManyField, как быЯ собираюсь сделать это без создания 3-х таблиц с одинаковой структурой?