From 3a24fbdc289f9e592ead9e0eef8bdf51144a0f58 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sun, 30 Jan 2022 13:45:55 +0100 Subject: [PATCH] Autocomplete slug for tag --- photologue/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/photologue/admin.py b/photologue/admin.py index e58d1c1..eae1eaa 100644 --- a/photologue/admin.py +++ b/photologue/admin.py @@ -19,7 +19,7 @@ class PhotoAdmin(admin.ModelAdmin): 'is_public', 'view_count', 'admin_thumbnail', 'get_owner') list_filter = ['date_added', 'is_public', 'owner'] search_fields = ['title', 'slug', 'caption'] - list_per_page = 10 + list_per_page = 25 prepopulated_fields = {'slug': ('title',)} readonly_fields = ('date_taken',) model = Photo @@ -33,6 +33,7 @@ class PhotoAdmin(admin.ModelAdmin): class TagAdmin(admin.ModelAdmin): list_display = ('name',) search_fields = ('name',) + prepopulated_fields = {'slug': ('name',)} model = Tag