@register.filter<EOL>def decimal_format(value, TWOPLACES=Decimal(<NUM_LIT:100>) ** -<NUM_LIT:2>):
if not isinstance(value, Decimal):<EOL><INDENT>value = Decimal(str(value))<EOL><DEDENT>return value.quantize(TWOPLACES)<EOL>
Format a decimal.Decimal like to 2 decimal places.