from django.db.models import Value from rest_framework.generics import RetrieveAPIView, CreateAPIView from rest_framework.permissions import IsAuthenticated from rest_framework.authentication import TokenAuthentication from drf_yasg.utils import swagger_auto_schema from drf_yasg import openapi from apps.quiz.serializers import QuizParticipantSerializer from apps.quiz.doc import * class QuizParticipantCreateAPIView(CreateAPIView): serializer_class = QuizParticipantSerializer permission_classes = [IsAuthenticated] authentication_classes = [TokenAuthentication] @swagger_auto_schema( operation_description=doc_quiz_submit(), tags=["Imam-Javad - Quiz"], ) def post(self, request, *args, **kwargs): return super().post(request, *args, **kwargs)