Customising the Admin
A ModelAdmin class controls columns, search, filters and read only fields.
Example
@admin.register(Post)
class PostAdmin(admin.ModelAdmin):
list_display = ("title", "created")
search_fields = ("title", "body")
list_filter = ("created",)
ordering = ("-created",)Exercise
Columns in the list.
list = ("title",)
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.