From 3fa6807837caf42d4f15bb94f546e95a9c7fcb25 Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Tue, 16 Oct 2018 09:53:30 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E6=B7=BB=E5=8A=A0=EF=BC=88=E5=87=8F?= =?UTF-8?q?=E6=B3=95=EF=BC=89=E6=A0=87=E7=AD=BE=E8=BF=87=E6=BB=A4=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/templatetags/common_tags.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/common/templatetags/common_tags.py b/apps/common/templatetags/common_tags.py index 7cafb0460..d77263955 100644 --- a/apps/common/templatetags/common_tags.py +++ b/apps/common/templatetags/common_tags.py @@ -106,3 +106,8 @@ def to_dict(data): def sort(data): print(data) return sorted(data) + + +@register.filter +def subtract(value, arg): + return value - arg