register = template.Library()

@register.filter
def div(value, arg):
    """
    Divides the value; argument is the divisor.
    Returns empty string on any error.
    """
django: how to do caculation inside the template html page?