diff options
Diffstat (limited to 'models.py')
-rw-r--r-- | models.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -158,9 +158,10 @@ class CourseManager(Manager): return self.get_queryset() \ .filter(**criteria) \ .order_by("groups__name", "year", "week") \ - .annotate(_=Count(("groups", "year", "week", "begin")), - year=ExtractYear("begin"), - week=ExtractWeek("begin")) + .annotate(year=ExtractYear("begin"), + week=ExtractWeek("begin")) \ + .values("groups__mention", + "groups__subgroup", "year", "week") class Course(models.Model): |