From 7b357ec2fcd00d3863f412eedc787f57b9361fca Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 17 Jan 2022 14:18:16 +0100 Subject: [PATCH] fix template with results --- .../templates/inventory/upload_snapshot.html | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/ereuse_devicehub/templates/inventory/upload_snapshot.html b/ereuse_devicehub/templates/inventory/upload_snapshot.html index c7580c11..66bbc4c7 100644 --- a/ereuse_devicehub/templates/inventory/upload_snapshot.html +++ b/ereuse_devicehub/templates/inventory/upload_snapshot.html @@ -30,15 +30,28 @@ {% endif %} -
+ {{ form.csrf_token }}
- +
- + {{ form.snapshot }}
You can select multiple files Snapshots JSON.
+ {% if form.result %} + {% for filename, result in form.result.items() %} + {% if result == 'Ok' %} +

+ {{ filename }}: {{ result }}
+

+ {% else %} +

+ {{ filename }}: {{ result }}
+

+ {% endif %} + {% endfor %} + {% endif %}