From cd330644503795289b6402e3622b5768b2ebed6c Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 13 Apr 2021 12:34:00 +0200 Subject: [PATCH] Fixes #4188: Ordering editing phases directly at the phases list page. --- src/documents/admin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/documents/admin.py b/src/documents/admin.py index b793303d..21390a75 100644 --- a/src/documents/admin.py +++ b/src/documents/admin.py @@ -11,10 +11,14 @@ class BookAdmin(admin.ModelAdmin): search_fields = ['title'] +class TagAdmin(admin.ModelAdmin): + list_display = ['name', 'ordering'] + list_editable = ['ordering'] + admin.site.register(models.Project) admin.site.register(models.Book, BookAdmin) admin.site.register(models.Chunk) -admin.site.register(models.Chunk.tag_model) +admin.site.register(models.Chunk.tag_model, TagAdmin) admin.site.register(models.Image) -admin.site.register(models.Image.tag_model) +admin.site.register(models.Image.tag_model, TagAdmin) -- 2.20.1