I have managed to create a QuerySet of what I want so far, but I am unable to include the .count ()
statement in it. I do know that I can use len (students)
, but I would like to stick to the Django ORM.
student_count = Student.objects.filter(last_online__range=[last week, this week])
How do I do that?