aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'models.py')
-rw-r--r--models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/models.py b/models.py
index b8c67d6..363cf33 100644
--- a/models.py
+++ b/models.py
@@ -56,6 +56,10 @@ class Source(models.Model):
def __str__(self):
return self.url
+ @property
+ def formatted_timetables(self):
+ return ", ".join([str(timetable) for timetable in self.timetables.iterator()])
+
class Meta:
verbose_name = "source d’emploi du temps"