From 884fd4579afcd40a44db23ee039490fb56061d5f Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Sun, 25 Feb 2018 16:16:47 +0100 Subject: [PATCH] Improve the admin panel for navbar elements Elements are now ordered by parent and weight. The parent, link and weight are now displayed in the list. fix issue #1 --- navbar/admin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/navbar/admin.py b/navbar/admin.py index efd32b7..e12cc4f 100644 --- a/navbar/admin.py +++ b/navbar/admin.py @@ -19,6 +19,8 @@ class ElementDescriptionInline(admin.StackedInline): class ElementAdmin(admin.ModelAdmin): + list_display = ('__str__', 'parent', 'link', 'weight') + ordering = ('parent', 'weight') inlines = [ElementDescriptionInline]