RealEstateEvaluationModel modeli qoshildi (Ko'chmas mulk (Real Estate) baholash modeli uchun quyidagicha nomlarni tavsiya qilaman:
)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from .auto import * # noqa
|
||||
from .customer import * # noqa
|
||||
from .real_estate import * # noqa
|
||||
from .valuation import * # noqa
|
||||
from .vehicle import * # noqa
|
||||
|
||||
25
core/apps/evaluation/views/real_estate.py
Normal file
25
core/apps/evaluation/views/real_estate.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 RealEstateEvaluationModel
|
||||
from core.apps.evaluation.serializers.real_estate import (
|
||||
CreateRealestateevaluationSerializer,
|
||||
ListRealestateevaluationSerializer,
|
||||
RetrieveRealestateevaluationSerializer,
|
||||
)
|
||||
|
||||
|
||||
@extend_schema(tags=["RealEstateEvaluation"])
|
||||
class RealEstateEvaluationView(BaseViewSetMixin, ReadOnlyModelViewSet):
|
||||
queryset = RealEstateEvaluationModel.objects.all()
|
||||
serializer_class = ListRealestateevaluationSerializer
|
||||
permission_classes = [AllowAny]
|
||||
|
||||
action_permission_classes = {}
|
||||
action_serializer_class = {
|
||||
"list": ListRealestateevaluationSerializer,
|
||||
"retrieve": RetrieveRealestateevaluationSerializer,
|
||||
"create": CreateRealestateevaluationSerializer,
|
||||
}
|
||||
Reference in New Issue
Block a user