Ticket #3693: defaultfilters.diff
File defaultfilters.diff, 998 bytes (added by , 18 years ago) |
---|
-
django_src/django/template/defaultfilters.py
70 70 With a negative numeric argument, it will display that many decimal 71 71 places -- but only if there's places to be displayed. 72 72 Examples: 73 num1 = 34.23234 74 num2 = 34.00000 75 num1|floatformat results in 34.2 76 num2|floatformat is 34 77 num1|floatformat:3 is 34.232 78 num2|floatformat:3 is 34.000 79 num1|floatformat:-3 is 34.232 80 num2|floatformat:-3 is 34 73 74 * num1 = 34.23234 75 * num2 = 34.00000 76 * num1|floatformat results in 34.2 77 * num2|floatformat is 34 78 * num1|floatformat:3 is 34.232 79 * num2|floatformat:3 is 34.000 80 * num1|floatformat:-3 is 34.232 81 * num2|floatformat:-3 is 34 81 82 """ 82 83 try: 83 84 f = float(text)