forked from GithubBackups/healthchecks
Drop the trunc
template filter, Django has a built in truncatechars
that does the same thing.
This commit is contained in:
parent
fdbe733df3
commit
0a50962f2b
@ -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:
|
||||
|
@ -19,11 +19,6 @@
|
||||
<td class="details">
|
||||
{% if event.scheme == "email" %}
|
||||
{{ event.ua }}
|
||||
<span class="ua-body">
|
||||
{% if event.body %}
|
||||
- {{ event.body|trunc }}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% else %}
|
||||
{{ event.scheme|upper }}
|
||||
{{ event.method }}
|
||||
@ -32,7 +27,7 @@
|
||||
{% endif %}
|
||||
<span class="ua-body">
|
||||
{% if event.ua %}
|
||||
- {{ event.ua }}
|
||||
- {{ event.ua|truncatechars:80 }}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
@ -55,7 +55,7 @@
|
||||
{{ event.ua }}
|
||||
<span class="ua-body">
|
||||
{% if event.body %}
|
||||
- {{ event.body|trunc }}
|
||||
- {{ event.body|truncatechars:150 }}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% else %}
|
||||
@ -69,7 +69,7 @@
|
||||
- {{ event.ua }}
|
||||
{% endif %}
|
||||
{% if event.body %}
|
||||
- {{ event.body|trunc }}
|
||||
- {{ event.body|truncatechars:150 }}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user