Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#9507 closed (fixed)

Broken examples in admin documentation

Reported by: John-Scott Atlakson 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: no UI/UX: no

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 Atlakson 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by John-Scott Atlakson

Attachment: r9333-admin-doc.diff added

comment:1 Changed 10 years ago by Chris Beaven

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

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 10 years ago by Malcolm Tredinnick

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

comment:3 Changed 10 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

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

comment:4 Changed 10 years ago by Malcolm Tredinnick

(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