Package madrona :: Package common :: Package templatetags :: Module percentage
[hide private]

Source Code for Module madrona.common.templatetags.percentage

 1  from django import template 
 2   
 3  register = template.Library() 
 4   
5 -def percentage(decimal, precision=0):
6 format_string = "." + str(precision) + "%" 7 return format(decimal, format_string)
8 9 register.filter('percentage', percentage) 10