summaryrefslogtreecommitdiff
path: root/django/utils/numberformat.py
AgeCommit message (Collapse)Author
2020-02-26Fixed #28280 -- Prevented numberformat.format() from formatting large/tiny ↵Hasan Ramezani
floats in scientific notation.
2019-04-13Fixed #30363 -- Do not use exponential notation for small decimal numbers.Sjoerd Job Postmus
In 9cc6a60040b0f64f8ea066dd215176d4bd16621d a security patch was introduced to prevent allocating large segments of memory when a very large or very small decimal number was to be formatted. As a side-effect, there was a change in formatting of small decimal numbers even when the `decimal_pos` argument was provided, which meant that reasonable small decimal numbers (above 1e-199) would be formatted as `0.00`, while smaller decimal numbers (under 1e-200) would be formatted as `1e-200`.
2019-02-11Fixed CVE-2019-6975 -- Fixed memory exhaustion in utils.numberformat.format().Carlton Gibson
Thanks Sjoerd Job Postmus for the report and initial patch. Thanks Michael Manfre, Tim Graham, and Florian Apolloner for review.
2018-07-19Fixed #29578 -- Made numberformat.format() honor forced l10n usage.Claude Paroz
Thanks Sassan Haradji for the report.
2018-07-09Removed unneded str() calls prior to mark_safe(); simplified mark_safe().Sergey Fedoseev
2018-01-03Fixed #28982 -- Simplified code with and/or.Дилян Палаузов
2017-02-11Refs #27656 -- Updated django.utils docstring verbs according to PEP 257.Anton Samarchyan
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-06-22Fixed #25920 -- Added support for non-uniform NUMBER_GROUPING.jasisz
2015-03-09Fixed #24382 -- Allowed unicode chars inside formatted numbersClaude Paroz
Thanks Jacob Rief for the report and Tim Graham for the review.
2015-02-08Fixed #24181 -- Fixed multi-char THOUSAND_SEPARATOR insertionVarun Sharma
Report and original patch by Kay Cha.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-12-03Fixed #23935 -- Converted decimals to fixed point in utils.numberformat.formatEric Rouleau
2012-09-18Fixed #18800 -- Support numbers bigger than max float in `numberformat`.Florian Apolloner
Thanks to jbvsmo for the patch and Brad Pitcher for the tests.
2012-07-22[py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin
2011-12-24Fixed #17414 -- Prevented numberformat from trying to group digits when the ↵Aymeric Augustin
number of digits per group is zero. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-08Fixed #16404 -- Fixed a regression in the localization changes in the ↵Jannis Leidel
humanize app made in r16168. Thanks, grepsd@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22Fixed #13810 -- Truncate numbers correctly when given number of decimal ↵Jannis Leidel
positions is zero. Thanks, milosu and Łukasz Rekucki. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16074 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27Fixed #14290 -- Made format localization faster by caching the format ↵Jannis Leidel
modules. Thanks, Teemu Kurppa and Anssi Kääriäinen for the report and initial patches. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-20Fixed #13054 - Only apply grouping to integer part of numbers if explicitly ↵Jannis Leidel
wanted. Thanks, Ramiro Morales. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12816 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22Fixed #7980 - Improved i18n framework to support locale aware formatting ↵Jannis Leidel
(dates and numbers) and form processing. Thanks to Marc Garcia for working on this during his Google Summer of Code 2009! Additionally fixes #1061, #2203, #3940, #5526, #6449, #6231, #6693, #6783, #9366 and #10891. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11964 bcc190cf-cafb-0310-a4f2-bffc1f526a37