Challenge 1: Register and Customize a Model — Possible Solution ==================================================================== # catalog/admin.py from django.contrib import admin from .models import Tag @admin.register(Tag) class TagAdmin(admin.ModelAdmin): list_display = ["name"] search_fields = ["name"] WHY THIS WORKS -------------- - @admin.register(Tag) is equivalent to writing admin.site.register(Tag, TagAdmin) separately — the decorator form ties the TagAdmin customization class to the Tag model in one step, right where the class is defined. - list_display = ["name"] tells the admin's list view to show the name column explicitly — without this, Tag's list page would fall back to showing only Tag's __str__ representation for each row (which happens to also just be name here, but list_display makes the column explicit and extensible if more fields are added to Tag later). - search_fields = ["name"] adds a search box above the list view that filters tags by a case-insensitive substring match on name — useful once a catalog has more than a handful of tags to scroll through. - This mirrors the BookAdmin pattern from the chapter exactly, just applied to a simpler model with fewer fields worth surfacing.