From 9a2da214567c3fd6231c6ffded4c5125d7805cdb Mon Sep 17 00:00:00 2001 From: Patrick Canterino Date: Sun, 6 Feb 2022 14:25:25 +0100 Subject: [PATCH] Automatically generate slug using the title --- notes/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/admin.py b/notes/admin.py index c2c09e5..2dd4171 100644 --- a/notes/admin.py +++ b/notes/admin.py @@ -7,6 +7,6 @@ class NoteAdmin(admin.ModelAdmin): list_display = ('title', 'status',) list_filter = ('status',) search_fields = ('title', 'content',) - + prepopulated_fields = {'slug': ('title',)} admin.site.register(Note, NoteAdmin) \ No newline at end of file -- 2.34.1