#34272: floatformat throws an error in some edge cases
-------------------------------------------+------------------------
Reporter: andriilahuta | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 4.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
{{{#!python
from decimal import Decimal
from django.template.defaultfilters import floatformat
floatformat('0.00', 0)
floatformat(Decimal('0.00'), 0)
}}}
Both throw {{{ValueError: valid range for prec is [1, MAX_PREC]}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34272>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070185c5ab46b3-d921a943-da2e-4b97-807f-43574d50d1d1-000000%40eu-central-1.amazonses.com.