diff --git a/hc/front/templatetags/hc_extras.py b/hc/front/templatetags/hc_extras.py index 54932822..62f3952b 100644 --- a/hc/front/templatetags/hc_extras.py +++ b/hc/front/templatetags/hc_extras.py @@ -70,11 +70,6 @@ def sortchecks(checks, key): return checks -@register.filter -def trunc(s): - return s[:150] - - @register.filter def num_down_title(num_down): if num_down: diff --git a/templates/front/details_events.html b/templates/front/details_events.html index 35d5c28c..1dc9e3c9 100644 --- a/templates/front/details_events.html +++ b/templates/front/details_events.html @@ -19,11 +19,6 @@ {% if event.scheme == "email" %} {{ event.ua }} - - {% if event.body %} - - {{ event.body|trunc }} - {% endif %} - {% else %} {{ event.scheme|upper }} {{ event.method }} @@ -32,7 +27,7 @@ {% endif %} {% if event.ua %} - - {{ event.ua }} + - {{ event.ua|truncatechars:80 }} {% endif %} {% endif %} diff --git a/templates/front/log.html b/templates/front/log.html index 4a4e6449..217befbf 100644 --- a/templates/front/log.html +++ b/templates/front/log.html @@ -55,7 +55,7 @@ {{ event.ua }} {% if event.body %} - - {{ event.body|trunc }} + - {{ event.body|truncatechars:150 }} {% endif %} {% else %} @@ -69,7 +69,7 @@ - {{ event.ua }} {% endif %} {% if event.body %} - - {{ event.body|trunc }} + - {{ event.body|truncatechars:150 }} {% endif %} {% endif %}