diff --git a/action/models.py b/action/models.py index 8a5633d..bf49e17 100644 --- a/action/models.py +++ b/action/models.py @@ -67,6 +67,7 @@ class Note(models.Model): def __str__(self): return f" Note: {self.description}, by {self.user.username} @ {self.user.institution} - {self.date}, for {self.snapshot_uuid}" + class DeviceLog(models.Model): institution = models.ForeignKey(Institution, on_delete=models.CASCADE) user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, blank=True) diff --git a/device/templates/details.html b/device/templates/details.html index 76f5944..505b1a8 100644 --- a/device/templates/details.html +++ b/device/templates/details.html @@ -29,7 +29,7 @@ - {{ state.state }} + {{ state.state }} {{ forloop.counter }} diff --git a/device/templates/tabs/log.html b/device/templates/tabs/log.html index 6ac5a24..dea3bea 100644 --- a/device/templates/tabs/log.html +++ b/device/templates/tabs/log.html @@ -1,7 +1,6 @@ {% load i18n %}
-
{% trans 'Log' %}
@@ -10,7 +9,7 @@ - + {% for log in device_logs %}
{% trans 'Event' %} {% trans 'User' %}