Renommage des relations entre tables.

Suppression du paramètre teamid dans l'url pour récupérer tout ce qui est lié aux courses
This commit is contained in:
2019-01-16 23:21:21 +01:00
parent 4cc49e4e9f
commit da5582ed19
23 changed files with 347 additions and 414 deletions

View File

@ -54,7 +54,7 @@ class EngagedPilot(models.Model):
# Foreign keys to the team pilot and race
team = models.ForeignKey(Team, related_name='team', on_delete=models.CASCADE)
pilot = models.ForeignKey(Driver, related_name='pilot', on_delete=models.CASCADE)
race = models.ForeignKey(Race, related_name='race', on_delete=models.CASCADE)
race = models.ForeignKey(Race, related_name='engagedpilots', on_delete=models.CASCADE)
order = models.IntegerField(default=None, blank=True, null=True)