AutoEvaluationModel qoshildi yani bu valuation bilan vehicle ni asosiy ulab beradigan model
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from .auto import * # noqa
|
||||
from .customer import * # noqa
|
||||
from .valuation import * # noqa
|
||||
from .vehicle import * # noqa
|
||||
|
||||
25
core/apps/evaluation/views/auto.py
Normal file
25
core/apps/evaluation/views/auto.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 AutoEvaluationModel
|
||||
from core.apps.evaluation.serializers.auto import (
|
||||
CreateAutoevaluationSerializer,
|
||||
ListAutoevaluationSerializer,
|
||||
RetrieveAutoevaluationSerializer,
|
||||
)
|
||||
|
||||
|
||||
@extend_schema(tags=["AutoEvaluation"])
|
||||
class AutoEvaluationView(BaseViewSetMixin, ReadOnlyModelViewSet):
|
||||
queryset = AutoEvaluationModel.objects.all()
|
||||
serializer_class = ListAutoevaluationSerializer
|
||||
permission_classes = [AllowAny]
|
||||
|
||||
action_permission_classes = {}
|
||||
action_serializer_class = {
|
||||
"list": ListAutoevaluationSerializer,
|
||||
"retrieve": RetrieveAutoevaluationSerializer,
|
||||
"create": CreateAutoevaluationSerializer,
|
||||
}
|
||||
Reference in New Issue
Block a user