summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2012-12-18 06:52:30 -0500
committerTim Graham <timograham@gmail.com>2012-12-18 08:20:01 -0500
commit6534a95ac3142ff79f8152b0d5dcbf9330d8abde (patch)
tree433a0264eedd9a088ebb9a3d971129bb81bb36c3 /docs
parent31f49f1396c4cc565017066e9f17c6b850a89687 (diff)
downloaddjango-6534a95ac3142ff79f8152b0d5dcbf9330d8abde.tar.gz
Fixed #19470 - Clarified widthratio example.
Thanks orblivion for the suggestion.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/templates/builtins.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index 57ef0cfb27..dd288ababc 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -1079,11 +1079,11 @@ value to a maximum value, and then applies that ratio to a constant.
For example::
<img src="bar.png" alt="Bar"
- height="10" width="{% widthratio this_value max_value 100 %}" />
+ height="10" width="{% widthratio this_value max_value max_width %}" />
-Above, if ``this_value`` is 175 and ``max_value`` is 200, the image in the
-above example will be 88 pixels wide (because 175/200 = .875; .875 * 100 = 87.5
-which is rounded up to 88).
+If ``this_value`` is 175, ``max_value`` is 200, and ``max_width`` is 100, the
+image in the above example will be 88 pixels wide
+(because 175/200 = .875; .875 * 100 = 87.5 which is rounded up to 88).
.. templatetag:: with