first commit

This commit is contained in:
2025-09-19 15:19:32 +05:00
commit d160410cd9
305 changed files with 9509 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
from django_core.mixins import BaseViewSetMixin
from drf_spectacular.utils import extend_schema
from rest_framework.permissions import AllowAny
from rest_framework.viewsets import ReadOnlyModelViewSet
from core.apps.accounts.models import ParticipantModel
from core.apps.accounts.serializers.participant import (
CreateParticipantSerializer,
ListParticipantSerializer,
RetrieveParticipantSerializer,
)
@extend_schema(tags=["participant"])
class ParticipantView(BaseViewSetMixin, ReadOnlyModelViewSet):
queryset = ParticipantModel.objects.all()
serializer_class = ListParticipantSerializer
permission_classes = [AllowAny]
action_permission_classes = {}
action_serializer_class = {
"list": ListParticipantSerializer,
"retrieve": RetrieveParticipantSerializer,
"create": CreateParticipantSerializer,
}