Opened 9 years ago

Closed 9 years ago

#1768 closed defect (fixed)

Erroneous discussion of repr in docs/tutorial02.txt?

Reported by: nick@… Owned by: jacob
Component: Documentation Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Under Customize the admin change list, docs/tutorial02.txt states that "By default, Django displays the repr of each object."

Should that read "Django displays the str of each object" ?

When I give a model class a __str__ method, the value returned by that method is what the admin interface displays, regardless of whether there is a __repr__ method defined. The only time that __repr__ seems to be called is when there is no
__str__ defined.

Change History (1)

comment:1 Changed 9 years ago by adrian

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

This has been clarified.

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