Answer the question
In order to leave comments, you need to log in
How to organize django model?
There is a FastApi model
class GroupInfo(BaseModel):
group_id: int
name: str
class Meeting(models.Model):
start_date = models.DateTimeField(
default=timezone.localtime,
)
end_date = models.DateTimeField(
default=timezone.localtime,
)
GroupInfo
have many references to meeting
, but meeting
was attributed to only 1 GroupInfo
class GroupInfo(models.Model):
meeting = models.ManyToManyField(Meeting)
group_id = models.IntegerField()
name = models.CharField(max_length=255)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question