diff --git a/depicts/model.py b/depicts/model.py index 7f08e26..7dd4eee 100644 --- a/depicts/model.py +++ b/depicts/model.py @@ -132,3 +132,7 @@ class WikidataQuery(Base): t = t[:-7] return t + + @property + def bad(self): + return self.status_code and self.status_code != 200 diff --git a/templates/query_list.html b/templates/query_list.html index 751442b..2bca69d 100644 --- a/templates/query_list.html +++ b/templates/query_list.html @@ -15,23 +15,25 @@
+
template
when
time
options
{% for obj in q %} - {% if obj.status_code and obj.status_code != 200 %}{% set class=" text-light bg-danger"%}{% endif %} -
-
+
+
+
+
{{ obj.template or '' }}
-
+
{{ obj.start_time.strftime('%Y %b %d %H:%M') }}
-
+
{% if obj.end_time %} {{ obj.display_seconds }} seconds {% else %} @@ -47,8 +49,8 @@
@@ -65,6 +67,7 @@ {% endif %}
+
{% endfor %}