| 26 | |
| 27 | |
| 28 | class Event(Model): |
| 29 | id = fields.IntField(primary_key=True) |
| 30 | name = fields.TextField() |
| 31 | tournament_id = fields.IntField() |
| 32 | # Here we make link to events.Team, not models.Team |
| 33 | participants: fields.ManyToManyRelation["Team"] = fields.ManyToManyField( |
| 34 | "events.Team", related_name="events", through="event_team" |
| 35 | ) |
| 36 | |
| 37 | def __str__(self): |
| 38 | return self.name |
| 39 | |
| 40 | class Meta: |
| 41 | app = "events" |
| 42 | |
| 43 | |
| 44 | class Team(Model): |
no outgoing calls
no test coverage detected
searching dependent graphs…