movable-model qoshildi bu (Ko'char mulk) modeli to'liq va optimallashgan holda tayyor!
This commit is contained in:
25
core/apps/evaluation/views/movable.py
Normal file
25
core/apps/evaluation/views/movable.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 MovablePropertyEvaluationModel
|
||||
from core.apps.evaluation.serializers.movable import (
|
||||
CreateMovablepropertyevaluationSerializer,
|
||||
ListMovablepropertyevaluationSerializer,
|
||||
RetrieveMovablepropertyevaluationSerializer,
|
||||
)
|
||||
|
||||
|
||||
@extend_schema(tags=["MovablePropertyEvaluation"])
|
||||
class MovablePropertyEvaluationView(BaseViewSetMixin, ReadOnlyModelViewSet):
|
||||
queryset = MovablePropertyEvaluationModel.objects.all()
|
||||
serializer_class = ListMovablepropertyevaluationSerializer
|
||||
permission_classes = [AllowAny]
|
||||
|
||||
action_permission_classes = {}
|
||||
action_serializer_class = {
|
||||
"list": ListMovablepropertyevaluationSerializer,
|
||||
"retrieve": RetrieveMovablepropertyevaluationSerializer,
|
||||
"create": CreateMovablepropertyevaluationSerializer,
|
||||
}
|
||||
Reference in New Issue
Block a user