feat(auto-evaluation): to'liq CRUD API va 4 bosqichli forma qo'shildi
- 10 ta yangi choice klass qo'shildi: ObjectOwnerType, PropertyRights, FormOwnership, LocationHighways, LocationConvenience, AutoCarType, AutoCarWheel - AutoEvaluationModel ga ~30 ta yangi field qo'shildi (4 bosqich): 1-bosqich: ro'yxatga olish raqami, sanalar, ob'ekt turi 2-bosqich: egasi ma'lumotlari (jismoniy/yuridik), mulk huquqi, egalik shakli 3-bosqich: manzil (viloyat, tuman, shahar, mahalla, ko'cha, uy) 4-bosqich: avtomobil (tex passport, marka, model, raqam, rang, dvigatel) - CreateSerializer ga validatsiya qo'shildi: passport formati (AA 1234567), tex passport formati (AAA 1234567), egasi turiga qarab majburiy fieldlar (jismoniy yoki yuridik) - View ReadOnlyModelViewSet dan ModelViewSet ga o'zgartirildi - Admin 4 bosqichli fieldset bilan yangilandi - Yangi filterlar: object_owner_type, property_rights, form_ownership - VehicleModel fieldlari FK → ReferenceitemModel ga o'tkazildi - Migratsiyalar: 0015, 0016, 0017
This commit is contained in:
@@ -13,7 +13,9 @@ from core.apps.evaluation.serializers.vehicle import (
|
||||
|
||||
@extend_schema(tags=["Vehicle"])
|
||||
class VehicleView(BaseViewSetMixin, ReadOnlyModelViewSet):
|
||||
queryset = VehicleModel.objects.all()
|
||||
queryset = VehicleModel.objects.select_related(
|
||||
"brand", "model", "color", "fuel_type", "body_type", "position",
|
||||
).all()
|
||||
serializer_class = ListVehicleSerializer
|
||||
permission_classes = [AllowAny]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user