summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-03-10 08:11:28 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-03-10 08:11:28 +0000
commit659aa8f01a085bba673c5ecdbd6902cb3bff35f9 (patch)
treed4fd8cc854e21690905458930c2b9a4f140dc83d
parente833595bc836f2c26c5acee54b8d083be07c6858 (diff)
Fixed #3693 -- Fixed RST error in floatformat docstring. Thanks, Simon
Greenhill. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/template/defaultfilters.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py
index b53375b42d..a025365c90 100644
--- a/django/template/defaultfilters.py
+++ b/django/template/defaultfilters.py
@@ -70,14 +70,15 @@ def floatformat(text, arg=-1):
With a negative numeric argument, it will display that many decimal
places -- but only if there's places to be displayed.
Examples:
- num1 = 34.23234
- num2 = 34.00000
- num1|floatformat results in 34.2
- num2|floatformat is 34
- num1|floatformat:3 is 34.232
- num2|floatformat:3 is 34.000
- num1|floatformat:-3 is 34.232
- num2|floatformat:-3 is 34
+
+ * num1 = 34.23234
+ * num2 = 34.00000
+ * num1|floatformat results in 34.2
+ * num2|floatformat is 34
+ * num1|floatformat:3 is 34.232
+ * num2|floatformat:3 is 34.000
+ * num1|floatformat:-3 is 34.232
+ * num2|floatformat:-3 is 34
"""
try:
f = float(text)