#17779: floatformat template filter no longer works at all -------------------------------------+------------------------------------- Reporter: jasper@… | Owner: nobody Type: Bug | Status: new Component: Template system | Version: SVN Severity: Release blocker | Resolution: Keywords: floatformat | Triage Stage: templatetag | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by jasper@…):
* needs_docs: => 0 * needs_tests: => 0 * needs_better_patch: => 0 Comment: The input value is simply returned due to this exception occurring when floatformat tries to quantize the Decimal instance: {{{ Traceback (most recent call last): File "<console>", line 1, in <module> File "/Users/.../django/template/defaultfilters.py", line 177, in floatformat Context(prec=prec)).as_tuple() File "/usr/local/Cellar/python/2.7.2/lib/python2.7/decimal.py", line 2442, in quantize 'quantize result has too many digits for current context') File "/usr/local/Cellar/python/2.7.2/lib/python2.7/decimal.py", line 3844, in _raise_error raise error(explanation) InvalidOperation: quantize result has too many digits for current context }}} This exception is caught at the end of the floatformat function and input_val is returned. -- Ticket URL: <https://code.djangoproject.com/ticket/17779#comment:1> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.