Template cannot format integers bigger than maximum float
|Reported by:||Owned by:||nobody|
|Cc:||jason@…, bradpitcher@…||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I cannot render in templates any integer (long in this case) bigger than the maximum float (approx. 3e308) because the 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.
Change History (6)
comment:1 Changed 5 years ago by
|Patch needs improvement:||set|
|Triage Stage:||Unreviewed → Accepted|
comment:4 Changed 5 years ago by
|Owner:||changed from Brad Pitcher to nobody|
|Patch needs improvement:||unset|
|Status:||assigned → new|