aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
authorAlban Gruin2017-02-11 11:44:29 +0100
committerAlban Gruin2017-02-11 11:44:29 +0100
commit5ebf37dddf5ee8bb8dbc9c167ebb30c7fc537e19 (patch)
tree236bb974897d0ff575fc0c5ed0bb433ab86f0a45 /models.py
parente2f3ddadef63c1bda330797740836e00c10fe448 (diff)
Ajout d'une propriété dans les groupes pour récupérer le tuple des informations du groupe
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 2100d35..0d3f2c0 100644
--- a/models.py
+++ b/models.py
@@ -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