#403 closed defect (fixed)
[patch] floatformat error
Reported by: | nesh <nesh [at] studioquattro [dot] co [dot] yu> | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Template system | Version: | |
Severity: | normal | Keywords: | |
Cc: | paul.bowsher@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When using floatformat with FloatField (MySQL)]:
R545
File "/Users/nesh/devel/django/django/core/template.py", line 411, in resolve_variable_with_filters obj = registered_filters[name][0](obj, arg) File "/Users/nesh/devel/django/django/core/defaultfilters.py", line 31, in floatformat if text - int(text) < 0.1: File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/decimal.py", line 636, in __cmp__ other = _convert_other(other) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/decimal.py", line 2863, in _convert_other raise TypeError, "You can interact Decimal only with int, long or Decimal data types." TypeError: You can interact Decimal only with int, long or Decimal data types.
Change History (4)
comment:1 by , 19 years ago
Cc: | added |
---|---|
Summary: | floatformat error → [patch] floatformat error |
comment:4 by , 19 years ago
Ah, sorry about the name -- usually I just look at whoever reported the ticket.
Note:
See TracTickets
for help on using tickets.
Excuse the partial diff, i've also got the file half-modified for another ticket