Compare commits

...

3 Commits

Author SHA1 Message Date
Arthur Hanson 19e9e18df4
Merge 7a3ef48d71 into 835012f2ed 2024-04-26 13:24:24 -07:00
Arthur 835012f2ed 15838 use naturalday for date not naturaltime 2024-04-26 16:19:21 -04:00
Arthur 7a3ef48d71 15802 change table anchor color 2024-04-24 15:02:16 -07:00
3 changed files with 8 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -27,3 +27,7 @@ pre {
// Tabler sets display: flex
display: inline-block;;
}
table a {
color: inherit!important;
}

View File

@ -5,7 +5,7 @@ import re
import yaml
from django import template
from django.contrib.contenttypes.models import ContentType
from django.contrib.humanize.templatetags.humanize import naturaltime
from django.contrib.humanize.templatetags.humanize import naturalday, naturaltime
from django.utils.html import escape
from django.utils.safestring import mark_safe
from markdown import markdown
@ -216,11 +216,12 @@ def render_yaml(value):
def isodate(value):
if type(value) is datetime.date:
text = value.isoformat()
return mark_safe(f'<span title="{naturalday(value)}">{text}</span>')
elif type(value) is datetime.datetime:
text = value.date().isoformat()
return mark_safe(f'<span title="{naturaltime(value)}">{text}</span>')
else:
return ''
return mark_safe(f'<span title="{naturaltime(value)}">{text}</span>')
@register.filter()