Customize tag admin
This commit is contained in:
parent
cf1b2af325
commit
bd9e89b79b
1 changed files with 4 additions and 2 deletions
|
@ -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",)}
|
||||
|
|
Reference in a new issue