Ticket #6030: floatformat.diff
File floatformat.diff, 849 bytes (added by , 17 years ago) |
---|
-
tests/regressiontests/defaultfilters/tests.py
37 37 u'13.1031' 38 38 >>> floatformat(u'foo', u'bar') 39 39 u'' 40 >>> floatformat(None) 41 u'' 40 42 41 43 >>> addslashes(u'"double quotes" and \'single quotes\'') 42 44 u'\\"double quotes\\" and \\\'single quotes\\\'' -
django/template/defaultfilters.py
89 89 """ 90 90 try: 91 91 f = float(text) 92 except ValueError:92 except (ValueError, TypeError): 93 93 return u'' 94 94 try: 95 95 d = int(arg)