﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
361	Some Basic Math Filters	ilikeprivacy@…	Adrian Holovaty	"This may be the wrong place to submit this...

I wanted some basic math filters (eg. add multiply divide subtract), there is already add so I created the others, no doubt probably the easiest filters I could create, though someone else may find them useful.

in django/core/defaultfilters.py
{{{
def mult(value, arg):
    ""Multiplies the arg and the value""
    return int(value) * int(arg)

def sub(value, arg):
    ""Subtracts the arg from the value""
    return int(value) - int(arg)

def div(value, arg):
    ""Divides the value by the arg""
    return int(value) / int(arg)

template.register_filter('mult', mult, True)
template.register_filter('sub', sub, True)
template.register_filter('div', div, True)
}}}"	defect	closed	Template system		normal	wontfix	filter math	Danilo Bargen	Unreviewed	0	0	0	0	0	0
