aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/models.py b/models.py
index c122bfd..b809a53 100644
--- a/models.py
+++ b/models.py
@@ -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):