summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSky <sky@skychristensen.com>2019-10-31 13:05:26 +1100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-10-31 10:48:35 +0100
commit3cf907c20c4f4d94f649fbb93a006af5c61b30b8 (patch)
treee12dc362ce4a95d621a7046582de751ec893e209 /docs
parent459de8dc29a45a40f3c22cb63ebd2b82336f7192 (diff)
Fixed #30761 -- Prevented floatformat filter from returning a negative zero.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/templates/builtins.txt5
-rw-r--r--docs/releases/3.1.txt3
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index b5ebff2b73..34c5a5c005 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -1722,6 +1722,11 @@ displayed. For example:
Using ``floatformat`` with no argument is equivalent to using ``floatformat``
with an argument of ``-1``.
+.. versionchanged:: 3.1
+
+ In older versions, a negative zero ``-0`` was returned for negative numbers
+ which round to zero.
+
.. templatefilter:: force_escape
``force_escape``
diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt
index ef2ab9b173..e8cb289873 100644
--- a/docs/releases/3.1.txt
+++ b/docs/releases/3.1.txt
@@ -279,6 +279,9 @@ Miscellaneous
* ``django.utils.decorators.classproperty()`` decorator is moved to
``django.utils.functional.classproperty()``.
+* :tfilter:`floatformat` template filter now outputs (positive) ``0`` for
+ negative numbers which round to zero.
+
.. _deprecated-features-3.1:
Features deprecated in 3.1