Commit 826850c5 by gw0 Committed by Florian Apolloner

Added ordering of tags by their name, displaying and prepopulating slug fields in Django admin.

parent 983f0833
......@@ -7,10 +7,13 @@ class TaggedItemInline(admin.StackedInline):
model = TaggedItem
class TagAdmin(admin.ModelAdmin):
list_display = ["name"]
inlines = [
TaggedItemInline
]
list_display = ["name", "slug"]
ordering = ["name", "slug"]
search_fields = ["name"]
prepopulated_fields = {"slug": ["name"]}
admin.site.register(Tag, TagAdmin)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment