From 703cec5da11e7b859ef0172f5cc656bd8040a846 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Mon, 27 Nov 2017 15:42:33 +0100 Subject: Relation source inverse --- models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models.py b/models.py index c55bbae..eba8f1c 100644 --- a/models.py +++ b/models.py @@ -68,7 +68,7 @@ class Timetable(SlugModel): name = models.CharField(max_length=64, verbose_name="nom") slug = models.SlugField(max_length=64, default="") source = models.ForeignKey(Source, on_delete=models.CASCADE, - verbose_name="source") + verbose_name="source", related_name="timetables") def __str__(self): return self.year.name + " " + self.name -- cgit v1.2.1