Customize tag admin

This commit is contained in:
Gabriel Augendre 2021-03-04 18:51:38 +01:00
parent cf1b2af325
commit bd9e89b79b

View file

@ -136,5 +136,7 @@ class ArticleAdmin(admin.ModelAdmin):
@register(Tag)
class TagAdmin(admin.ModelAdmin):
list_display = ["name"]
search_fields = ["name"]
list_display = ["name", "slug"]
search_fields = ["slug", "name"]
list_display_links = ["slug", "name"]
prepopulated_fields = {"slug": ("name",)}