summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2007-12-11 06:55:25 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2007-12-11 06:55:25 +0000
commitf9410dc40d7a5a6ecbe42ea2ce8328fb3d22e89d (patch)
tree3215c0bdbc0f7d2b96c3e938be30df755f439229
parenta4478ee9c6acf0e50fa37265e2af20b9da856ba1 (diff)
Fixed #6151 -- Added some code formatting to the `floatformat` template filter doc section. Thanks, adamv.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6913 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/templates.txt42
1 files changed, 21 insertions, 21 deletions
diff --git a/docs/templates.txt b/docs/templates.txt
index 3b38caf58b..ffda321512 100644
--- a/docs/templates.txt
+++ b/docs/templates.txt
@@ -1335,36 +1335,36 @@ floatformat
When used without an argument, rounds a floating-point number to one decimal
place -- but only if there's a decimal part to be displayed. For example:
-======== ======================= ======
-value Template Output
-======== ======================= ======
-34.23234 {{ value|floatformat }} 34.2
-34.00000 {{ value|floatformat }} 34
-34.26000 {{ value|floatformat }} 34.3
-======== ======================= ======
+============ =========================== ========
+``value`` Template Output
+============ =========================== ========
+``34.23234`` ``{{ value|floatformat }}`` ``34.2``
+``34.00000`` ``{{ value|floatformat }}`` ``34``
+``34.26000`` ``{{ value|floatformat }}`` ``34.3``
+============ =========================== ========
If used with a numeric integer argument, ``floatformat`` rounds a number to
that many decimal places. For example:
-======== ========================= ======
-value Template Output
-======== ========================= ======
-34.23234 {{ value|floatformat:3 }} 34.232
-34.00000 {{ value|floatformat:3 }} 34.000
-34.26000 {{ value|floatformat:3 }} 34.260
-======== ========================= ======
+============ ============================= ==========
+``value`` Template Output
+============ ============================= ==========
+``34.23234`` ``{{ value|floatformat:3 }}`` ``34.232``
+``34.00000`` ``{{ value|floatformat:3 }}`` ``34.000``
+``34.26000`` ``{{ value|floatformat:3 }}`` ``34.260``
+============ ============================= ==========
If the argument passed to ``floatformat`` is negative, it will round a number
to that many decimal places -- but only if there's a decimal part to be
displayed. For example:
-======== ============================ ======
-value Template Output
-======== ============================ ======
-34.23234 {{ value|floatformat:"-3" }} 34.232
-34.00000 {{ value|floatformat:"-3" }} 34
-34.26000 {{ value|floatformat:"-3" }} 34.260
-======== ============================ ======
+============ ================================ ==========
+``value`` Template Output
+============ ================================ ==========
+``34.23234`` ``{{ value|floatformat:"-3" }}`` ``34.232``
+``34.00000`` ``{{ value|floatformat:"-3" }}`` ``34``
+``34.26000`` ``{{ value|floatformat:"-3" }}`` ``34.260``
+============ ================================ ==========
Using ``floatformat`` with no argument is equivalent to using ``floatformat``
with an argument of ``-1``.