Skip to content

Commit

Permalink
Fixed #3693 -- Fixed RST error in floatformat docstring. Thanks, Simon
Browse files Browse the repository at this point in the history
Greenhill.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Mar 10, 2007
1 parent e833595 commit 659aa8f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions django/template/defaultfilters.py
Expand Up @@ -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)
Expand Down

0 comments on commit 659aa8f

Please sign in to comment.