В админ панели информация по голсованию скажи спасибо добавлена.

This commit is contained in:
Andrei Filippov committed 2024-10-29 16:38:28 +03:00
1 parent 6233c9fd48
commit af1f9f752c
4 files changed
+106 -21

No files matched your search

+16
View File
@@ -66,3 +66,19 @@ class GetBest(APIView):
count_bests = BestVote.objects.values(
'cand_name').annotate(total=Count('id'))
return Response(count_bests)
class GetNotVoteThn(APIView):
def get(self, request):
list_thn_users = ThanksVote.objects.values('voted_user')
list_emp = DictEmployee.objects.filter(
deleted=0).exclude(login__in=list_thn_users)
return Response(GetEmpSerializer(list_emp, many=True).data)
class GetNotVoteBst(APIView):
def get(self, request):
list_bst_users = BestVote.objects.values('voted_user')
list_emp_bst = DictEmployee.objects.filter(
deleted=0).exclude(login__in=list_bst_users)
return Response(GetEmpSerializer(list_emp_bst, many=True).data)