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:
Husanjonazamov
2026-03-10 12:10:28 +05:00
parent b3581233c1
commit 5c2fe032d0
13 changed files with 1021 additions and 78 deletions

View File

@@ -18,20 +18,19 @@ class VehicleAdmin(ModelAdmin):
"mileage",
)
list_filter = (
"fuel_type",
"body_type",
"condition",
"manufacture_year",
)
search_fields = (
"brand",
"model",
"brand__name",
"model__name",
"license_plate",
"vin_number",
"engine_number",
"tech_passport_number",
)
readonly_fields = ("created_at", "updated_at")
autocomplete_fields = ("brand", "model", "color", "fuel_type", "body_type", "position")
fieldsets = (
("Texnik passport", {
"fields": (