Answer the question
In order to leave comments, you need to log in
How to implement this model?
there is a class:
class Meeting(models.Model):
name = models.CharField(max_length = 255)
Meeting
and one Meeting
can only have one GroupMeeting: Meeting
!?class GroupMeeting ( models . Model ):
meeting = models . ForeignKey ( Meeting , on_delete = models.SET_NULL
group_id = models . IntegerField ()
name = models . CharField ( max_length = 255 )
GroupMeeting
is connected with one Meeting
, but Meeting
connected with many GroupMeeting
Answer the question
In order to leave comments, you need to log in
Somehow you contradict yourself
GroupMeeting can have many Meetings
and Meeting Only one group ..
So if I choose 1 meeting for 2 different groups, then it turns out that the meeting will already have 2 groups ...
I see only through
group = models.ForeignKey(GroupMeeting....)
Maybe someone else will have ideas
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question