From dc14f2e27ac9e4738d90a787fc9990584e19a308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Thu, 2 Jul 2020 07:40:45 +0800 Subject: [PATCH] Renamed the human_date filter to smart_date. --- accounting/templates/accounting/cash.html | 2 +- mia_core/templatefilters.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accounting/templates/accounting/cash.html b/accounting/templates/accounting/cash.html index bee3383..857f80a 100644 --- a/accounting/templates/accounting/cash.html +++ b/accounting/templates/accounting/cash.html @@ -49,7 +49,7 @@ First written: 2020/7/1 {% for record in records %} - {{ record.transaction.date|human_date }} + {{ record.transaction.date|smart_date }} {{ record.subject.title_zhtw }} {{ record.summary }} {{ record.debit_amount|intcomma:False }} diff --git a/mia_core/templatefilters.py b/mia_core/templatefilters.py index cd275be..a233330 100644 --- a/mia_core/templatefilters.py +++ b/mia_core/templatefilters.py @@ -25,7 +25,7 @@ register = template.Library() @register.filter(is_safe=True) -def human_date(value): +def smart_date(value): """Formats the date for human friendliness. Args: