diff --git a/borgweb/borg/models/error.py b/borgweb/borg/models/error.py index 51586a1..f242e75 100644 --- a/borgweb/borg/models/error.py +++ b/borgweb/borg/models/error.py @@ -1,8 +1,14 @@ from django.db import models from . import Label +from ..utility.time import time_ago +from datetime import datetime class Error(models.Model): label = models.ForeignKey(Label, on_delete=models.CASCADE, related_name='errors') error = models.TextField() time = models.DateTimeField() + + def time_ago(self): + return f"{time_ago(self.time, False, True)} ago" + diff --git a/borgweb/borg/static/css/index.css b/borgweb/borg/static/css/index.css index 21b4ae6..5b9e1ec 100644 --- a/borgweb/borg/static/css/index.css +++ b/borgweb/borg/static/css/index.css @@ -1,7 +1,7 @@ div { padding: 8px; margin: 8px; - background: lightblue; + background: lightskyblue; } dl { diff --git a/borgweb/borg/templates/borg/index.html b/borgweb/borg/templates/borg/index.html index 01cd027..71ce2f1 100644 --- a/borgweb/borg/templates/borg/index.html +++ b/borgweb/borg/templates/borg/index.html @@ -36,9 +36,9 @@