feat(evaluation): baholash modellari yaratildi (auto, ko'chmas mulk, ko'char mulk, tezkor, hisobot)
This commit is contained in:
25
core/apps/evaluation/views/report.py
Normal file
25
core/apps/evaluation/views/report.py
Normal 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.evaluation.models import EvaluationReportModel
|
||||
from core.apps.evaluation.serializers.report import (
|
||||
CreateEvaluationreportSerializer,
|
||||
ListEvaluationreportSerializer,
|
||||
RetrieveEvaluationreportSerializer,
|
||||
)
|
||||
|
||||
|
||||
@extend_schema(tags=["EvaluationReport"])
|
||||
class EvaluationReportView(BaseViewSetMixin, ReadOnlyModelViewSet):
|
||||
queryset = EvaluationReportModel.objects.all()
|
||||
serializer_class = ListEvaluationreportSerializer
|
||||
permission_classes = [AllowAny]
|
||||
|
||||
action_permission_classes = {}
|
||||
action_serializer_class = {
|
||||
"list": ListEvaluationreportSerializer,
|
||||
"retrieve": RetrieveEvaluationreportSerializer,
|
||||
"create": CreateEvaluationreportSerializer,
|
||||
}
|
||||
Reference in New Issue
Block a user