from rest_framework.views import APIView from rest_framework.response import Response from .models import * # Create your views here. class GetThanks(APIView): def get(self, request): cand_id = request.GET.get('id') req_cand = ThanksVote.objects.filter(cand_name_id = cand_id, thanks = True) print(f'candidate_id: {req_cand}') return Response('test')