Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#19470 closed Cleanup/optimization (fixed)

Width Ratio - slightly more clear example?

Reported by: orblivion Owned by: nobody
Component: Documentation Version: 1.5-beta-1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Very minor nitpick: https://docs.djangoproject.com/en/dev/ref/templates/builtins/#widthratio

<img src="bar.gif" height="10" width="{% widthratio this_value max_value 100 %}" />

To be more explicit, I think it should say:

<img src="bar.gif" height="10" width="{% widthratio this_value max_value max_width %}" />

Since there's no other outright explanation of all the parameters. And of course, update the explanation accordingly. Perhaps give a separate sample with actual numbers if that makes the explanations more clear. But for a lot of people, a cursory look at the template tag with the parameters named should give all the information necessary.

Thanks.

Attachments (1)

19470.diff (1.8 KB) - added by timo 3 years ago.

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by timo

comment:1 Changed 3 years ago by timo

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 6534a95ac3142ff79f8152b0d5dcbf9330d8abde:

Fixed #19470 - Clarified widthratio example.

Thanks orblivion for the suggestion.

comment:3 Changed 3 years ago by Tim Graham <timograham@…>

In 034c3551188189cc0faa9a9ccc88a191c855aa45:

[1.5.X] Fixed #19470 - Clarified widthratio example.

Thanks orblivion for the suggestion.

Backport of 6534a95ac3 from master

Note: See TracTickets for help on using tickets.
Back to Top