1 2 3 4 5 6
from django import template register = template.Library() @register.filter def subtract(value, arg): return value - arg