admin fayllari to'g'irlandi
This commit is contained in:
@@ -5,8 +5,58 @@ from core.apps.evaluation.models import QuickEvaluationModel
|
||||
|
||||
|
||||
@admin.register(QuickEvaluationModel)
|
||||
class QuickevaluationAdmin(ModelAdmin):
|
||||
class QuickEvaluationAdmin(ModelAdmin):
|
||||
list_display = (
|
||||
"id",
|
||||
"__str__",
|
||||
"created_by",
|
||||
"brand",
|
||||
"model",
|
||||
"license_plate",
|
||||
"manufacture_year",
|
||||
"condition",
|
||||
"estimated_price",
|
||||
"created_at",
|
||||
)
|
||||
list_filter = (
|
||||
"fuel_type",
|
||||
"body_type",
|
||||
"condition",
|
||||
)
|
||||
search_fields = (
|
||||
"brand",
|
||||
"model",
|
||||
"license_plate",
|
||||
"vin_number",
|
||||
"engine_number",
|
||||
"tech_passport_number",
|
||||
)
|
||||
readonly_fields = ("created_at", "updated_at")
|
||||
raw_id_fields = ("created_by",)
|
||||
fieldsets = (
|
||||
("Foydalanuvchi", {
|
||||
"fields": ("created_by",),
|
||||
}),
|
||||
("Transport ma'lumotlari", {
|
||||
"fields": (
|
||||
"tech_passport_number",
|
||||
"license_plate",
|
||||
("brand", "model"),
|
||||
("manufacture_year", "color"),
|
||||
("vin_number", "engine_number"),
|
||||
"mileage",
|
||||
),
|
||||
}),
|
||||
("Texnik holat", {
|
||||
"fields": (
|
||||
("fuel_type", "body_type"),
|
||||
"condition",
|
||||
),
|
||||
}),
|
||||
("Natija", {
|
||||
"fields": ("estimated_price",),
|
||||
}),
|
||||
("Tizim", {
|
||||
"classes": ("collapse",),
|
||||
"fields": ("created_at", "updated_at"),
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user