Files
lab-django/autoapp/admin.py
2026-02-22 12:29:18 +05:00

13 lines
334 B
Python

from django.contrib import admin
# Register your models here.
from .models import Auto
@admin.register(Auto)
class AutoAdmin(admin.ModelAdmin):
list_display = ("brand", "model", "year", "color", "created_at")
list_filter = ("brand", "year", "color")
search_fields = ("brand", "model")
ordering = ("-year", "brand")