Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9507 closed (fixed)

Broken examples in admin documentation

Reported by: john_scott Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: UI/UX:

Description

Two examples in the admin doc incorrectly call .upper() on a tuple.

Attachments (1)

r9333-admin-doc.diff (937 bytes) - added by john_scott 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by john_scott

comment:1 Changed 7 years ago by SmileyChris

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

With a function called upper_case_name, the output should match. Something like:

return ("%s %s" % (obj.first_name, obj.last_name)).upper()

or probably this would be clearer:

name = "%s %s" % (obj.first_name, obj.last_name)
return name.upper()

comment:2 Changed 7 years ago by mtredinnick

Yes, Chris' first example is the intention. Otherwise the example wouldn't make sense.

comment:3 Changed 7 years ago by mtredinnick

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

(In [9432]) Fixed #9507 -- Correct an example in the admin docs. Thanks, john_scott and
SmileyChris.

comment:4 Changed 7 years ago by mtredinnick

(In [9433]) [django-1.0.X] Fixed #9507 -- Correct an example in the admin docs. Thanks,
john_scott and SmileyChris.

Backport of r9432 from trunk.

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