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:
@@ -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": (
|
||||
|
||||
Reference in New Issue
Block a user