diff options
author | Alban Gruin | 2017-11-27 17:23:11 +0100 |
---|---|---|
committer | Alban Gruin | 2017-11-27 17:23:11 +0100 |
commit | 8a71b0a55847e8783006b5a9514f64e0129578c9 (patch) | |
tree | ec8b6d6f014cd387c6de300942401ec43608aded /models.py | |
parent | a5b0d082a728b06e5e02f4d64632ac0b0a572aec (diff) |
Fonction pour formater les emplois du temps à partir d’une source
Diffstat (limited to 'models.py')
-rw-r--r-- | models.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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" |