Create subtract filter.

This commit is contained in:
Bradley M. Kuhn 2015-11-30 18:58:12 -08:00
parent 5c4cc1e2e1
commit 99d3325e33
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,6 @@
from django import template
register = template.Library()
@register.filter
def subtract(value, arg):
return value - arg

View file

@ -1,4 +1,5 @@
{% load humanize %}
{% load subtract %}
<!DOCTYPE html>
<html lang="en">