[cosmetic] add css no-wrap on CRUD's last modified (#6522)

This commit is contained in:
Maxime Beauchemin
2018-12-18 16:13:21 -08:00
committed by GitHub
parent 3f29a1dd70
commit 5a1ff0f09d

View File

@@ -270,12 +270,12 @@ class AuditMixinNullable(AuditMixin):
@renders('changed_on')
def changed_on_(self):
return Markup(
'<span class="no-wrap">{}</span>'.format(self.changed_on))
return Markup(f'<span class="no-wrap">{self.changed_on}</span>')
@renders('changed_on')
def modified(self):
return humanize.naturaltime(datetime.now() - self.changed_on)
time_str = humanize.naturaltime(datetime.now() - self.changed_on)
return Markup(f'<span class="no-wrap">{time_str}</span>')
class QueryResult(object):