#18800: Template cannot format integers bigger than maximum float
---------------------------------+-------------------------
     Reporter:  jbvsmo@…         |      Owner:  nobody
         Type:  Bug              |     Status:  new
    Component:  Template system  |    Version:  1.4
     Severity:  Normal           |   Keywords:  float, long
 Triage Stage:  Unreviewed       |  Has patch:  1
Easy pickings:  0                |      UI/UX:  0
---------------------------------+-------------------------
 I cannot render in templates any integer (long in this case) bigger than
 the maximum float (approx. 3e308) because the
 [https://github.com/django/django/blob/master/django/utils/numberformat.py
 django.utils.numberformat] module do cast everything to float just to
 check the sign.

 Funny thing is that the number is then converted to string and the minus
 symbol is removed. So, the easiest fix would be: Grab the sign after
 string formatting.

 I made this change and generated a patch with my IDE (that's why the funky
 file path). All the tests pass.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18800>
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to