Prepopulate the slug field in the Task Admin page

This commit is contained in:
Adam Goldsmith 2020-12-03 17:59:45 -05:00
parent 9ec48f075f
commit 6640306113

View File

@ -3,5 +3,11 @@ from django.contrib import admin
from .models import Tool, Task, Event
admin.site.register(Tool)
admin.site.register(Task)
@admin.register(Task)
class TaskAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
admin.site.register(Event)