Compare commits
3 Commits
3b073c88ce
...
19e9e18df4
Author | SHA1 | Date |
---|---|---|
Arthur Hanson | 19e9e18df4 | |
Arthur | 835012f2ed | |
Arthur | 7a3ef48d71 |
File diff suppressed because one or more lines are too long
|
@ -27,3 +27,7 @@ pre {
|
||||||
// Tabler sets display: flex
|
// Tabler sets display: flex
|
||||||
display: inline-block;;
|
display: inline-block;;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table a {
|
||||||
|
color: inherit!important;
|
||||||
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import re
|
||||||
import yaml
|
import yaml
|
||||||
from django import template
|
from django import template
|
||||||
from django.contrib.contenttypes.models import ContentType
|
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.html import escape
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
from markdown import markdown
|
from markdown import markdown
|
||||||
|
@ -216,11 +216,12 @@ def render_yaml(value):
|
||||||
def isodate(value):
|
def isodate(value):
|
||||||
if type(value) is datetime.date:
|
if type(value) is datetime.date:
|
||||||
text = value.isoformat()
|
text = value.isoformat()
|
||||||
|
return mark_safe(f'<span title="{naturalday(value)}">{text}</span>')
|
||||||
elif type(value) is datetime.datetime:
|
elif type(value) is datetime.datetime:
|
||||||
text = value.date().isoformat()
|
text = value.date().isoformat()
|
||||||
|
return mark_safe(f'<span title="{naturaltime(value)}">{text}</span>')
|
||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
return mark_safe(f'<span title="{naturaltime(value)}">{text}</span>')
|
|
||||||
|
|
||||||
|
|
||||||
@register.filter()
|
@register.filter()
|
||||||
|
|
Loading…
Reference in New Issue