From bd4b7135606f018cd1f8ce0b9002469a9e257d93 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Date: Sat, 15 Dec 2018 13:01:10 +0100 Subject: [PATCH] Add device model display to edit form, sort devices in index --- manager/templates/manager/edit.html | 8 ++++++++ manager/views.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/manager/templates/manager/edit.html b/manager/templates/manager/edit.html index 6a765a2..aef83de 100644 --- a/manager/templates/manager/edit.html +++ b/manager/templates/manager/edit.html @@ -8,10 +8,18 @@ +{% if user.is_staff %} +
+ + +
+{% endif %} {% if user.is_superuser %}
+{% endif %} +{% if user.is_staff %}
diff --git a/manager/views.py b/manager/views.py index d40d833..986d324 100644 --- a/manager/views.py +++ b/manager/views.py @@ -99,7 +99,7 @@ def devices(request): "title": "Device Administration", "user": user, "organization": orga, - "devices": devices + "devices": sorted(devices, key=lambda x: x.__str__()) } ) else: