Commit ea1dee96f53d188f2f3c9a309d0770c007217ec8
1 parent
cf0c45e2
Exists in
master
and in
2 other branches
solved day_num problem
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
reports/views.py
... | ... | @@ -364,7 +364,7 @@ class ViewReportView(LoginRequiredMixin, generic.TemplateView): |
364 | 364 | time_delta = math.fabs(end_time - begin_time) |
365 | 365 | |
366 | 366 | hours_viewed += time_delta/3600 #so it's turned this seconds into hours |
367 | - for daynum in day_numbers: | |
367 | + for day_num in day_numbers: | |
368 | 368 | count_temp = Log.objects.filter(action="view", resource=resources_types[i].lower(), |
369 | 369 | user_id = student.id, context__contains = {'subject_id': subject.id, |
370 | 370 | resources_types[i].lower()+'_id': resource.id, 'topic_id': topics.id}, datetime__week_day = day_num+1, datetime__range=(init_date, end_date)).count() | ... | ... |