From 3cf907c20c4f4d94f649fbb93a006af5c61b30b8 Mon Sep 17 00:00:00 2001 From: Sky Date: Thu, 31 Oct 2019 13:05:26 +1100 Subject: Fixed #30761 -- Prevented floatformat filter from returning a negative zero. --- docs/ref/templates/builtins.txt | 5 +++++ docs/releases/3.1.txt | 3 +++ 2 files changed, 8 insertions(+) (limited to 'docs') 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 -- cgit v1.3