Топ комментатор
This commit is contained in:
1 parent
b391492d86
commit
da5604c2a8
13 files changed
+111
-113
No files matched your search
@@ -66,17 +66,17 @@ class Counter(ListAPIView):
|
||||
'criteria': list(rating.values('crit__name').annotate(ratings=Avg('rating'), name=F('crit__name'), ico=F('crit__ico'), color=F('crit__color')).values('ratings', 'name', 'ico', 'color')),
|
||||
'data': {
|
||||
'score': {
|
||||
'title': 'Оставлено комментариев',
|
||||
'title': 'Поставлено оценок',
|
||||
'all': feed.values_list('comment', flat=True).count(),
|
||||
'period': feed.values_list('comment', flat=True).filter(time_create__range=[request.GET.get("start"), request.GET.get("end")]).count()
|
||||
},
|
||||
'comment': {
|
||||
'title': 'Поставлено оценок',
|
||||
'title': 'Оставлено комментариев',
|
||||
'all': feed.values_list('comment', flat=True).filter(~Q(comment='')).count(),
|
||||
'period': feed.values_list('comment', flat=True).filter(Q(time_create__range=[request.GET.get("start"), request.GET.get("end")]) & ~Q(comment='')).count()
|
||||
}
|
||||
},
|
||||
'last_comment': feed.values('time_create').filter(~Q(comment='')).earliest('time_create'),
|
||||
'last_comment': feed.values('time_create').filter(~Q(comment='')).latest('time_create'),
|
||||
# 'avg_score': round(avgrating['res'], 2)
|
||||
},
|
||||
'for_formulas': {
|
||||
|
||||
Reference in new issue
Block a user