diff options
author | Alban Gruin | 2017-02-11 11:44:29 +0100 |
---|---|---|
committer | Alban Gruin | 2017-02-11 11:44:29 +0100 |
commit | 5ebf37dddf5ee8bb8dbc9c167ebb30c7fc537e19 (patch) | |
tree | 236bb974897d0ff575fc0c5ed0bb433ab86f0a45 | |
parent | e2f3ddadef63c1bda330797740836e00c10fe448 (diff) |
Ajout d'une propriété dans les groupes pour récupérer le tuple des informations du groupe
-rw-r--r-- | models.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -75,6 +75,10 @@ class Group(models.Model): def corresponds_to(self, timetable_id, mention, subgroup, td, tp): return self.timetable.id == timetable_id and self.mention == mention and self.subgroup == subgroup and (self.td == td or self.td is None or td is None) and (self.tp == tp or self.tp is None or tp is None) + @property + def group_info(self): + return self.timetable.id, self.mention, self.subgroup, self.td, self.tp + def __str__(self): return self.name |