[2.0.x] Fixed #30177 -- Fixed format_number() crash with over 200 digits.
There are existing test failures. The incorrect patch was applied
in 1f42f82566
.
This commit is contained in:
parent
6d0a3002ed
commit
392e040647
|
@ -36,7 +36,7 @@ def format(number, decimal_sep, decimal_pos=None, grouping=0, thousand_sep='',
|
|||
# Format the coefficient.
|
||||
coefficient = format(
|
||||
coefficient, decimal_sep, decimal_pos, grouping,
|
||||
thousand_sep, force_grouping, use_l10n,
|
||||
thousand_sep, force_grouping,
|
||||
)
|
||||
return '{}e{}'.format(coefficient, exponent)
|
||||
else:
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
===========================
|
||||
Django 2.0.13 release notes
|
||||
===========================
|
||||
|
||||
*February 12, 2019*
|
||||
|
||||
Django 2.0.13 fixes a regression in 2.0.12/2.0.11.
|
||||
|
||||
Bugfixes
|
||||
========
|
||||
|
||||
* Fixed crash in ``django.utils.numberformat.format_number()`` when the number
|
||||
has over 200 digits (:ticket:`30177`).
|
|
@ -25,6 +25,7 @@ versions of the documentation contain the release notes for any later releases.
|
|||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
2.0.13
|
||||
2.0.12
|
||||
2.0.11
|
||||
2.0.10
|
||||
|
|
Loading…
Reference in New Issue