Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Beefed up docs for floatformat template filter

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1342 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3ae9542c2473e557566cc065156c6b1054ce3894 1 parent 912ddb1
@adrianholovaty adrianholovaty authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 docs/templates.txt
View
8 docs/templates.txt
@@ -770,8 +770,12 @@ Replaces ampersands with ``&`` entities.
floatformat
~~~~~~~~~~~
-Displays a floating point number as 34.2 (with one decimal places) -- but only
-if there's a point to be displayed.
+Rounds a floating-point number to one decimal place -- but only if there's a
+decimal part to be displayed. For example:
+
+ * ``36.123`` gets converted to ``36.123``
+ * ``36.15`` gets converted to ``36.2``
+ * ``36`` gets converted to ``36``
get_digit
~~~~~~~~~
Please sign in to comment.
Something went wrong with that request. Please try again.