Skip to content

Commit

Permalink
add: tags, prepopulate slug on create
Browse files Browse the repository at this point in the history
  • Loading branch information
zft9xgy committed Jul 25, 2024
1 parent 90d3ebe commit 0872024
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tags/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
from tags.models import Tag


admin.site.register(Tag)

class TagAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}

admin.site.register(Tag, TagAdmin)

0 comments on commit 0872024

Please sign in to comment.