diff options
author | Alban Gruin | 2018-01-20 17:24:18 +0100 |
---|---|---|
committer | Alban Gruin | 2018-01-21 19:42:55 +0100 |
commit | 8ad4a03f9d6ab6d218ddcbe277ca3766f05f6d79 (patch) | |
tree | 5ae1153b8e83dfd0d52528857982bad8ad98d316 | |
parent | 6f4822291d89dadcb6bae94c897e89e309218e7e (diff) |
Légère optimisation de la page des groupes
-rw-r--r-- | models.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -200,7 +200,8 @@ class CourseManager(Manager): .annotate(year=ExtractYear("begin"), week=ExtractWeek("begin")) \ .values("groups__mention", "groups__semester", - "groups__subgroup", "year", "week") + "groups__subgroup", "year", "week") \ + .annotate(c=Count("*")) class Course(models.Model): |