В админ панели информация по голсованию скажи спасибо добавлена.
This commit is contained in:
1 parent
6233c9fd48
commit
af1f9f752c
4 files changed
+106
-21
No files matched your search
@@ -9,4 +9,6 @@ urlpatterns = [
|
||||
path('getthanks/', GetThanks.as_view(), name=''),
|
||||
path('setbest/', SetBest.as_view(), name=''),
|
||||
path('getbest/', GetBest.as_view(), name=''),
|
||||
path('getnotvotethn/', GetNotVoteThn.as_view()),
|
||||
path('getnotvotebst/', GetNotVoteBst.as_view()),
|
||||
]
|
||||
@@ -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)
|
||||
Reference in new issue
Block a user