Opened 19 years ago
Closed 18 years ago
#1768 closed defect (fixed)
Erroneous discussion of repr in docs/tutorial02.txt?
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
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.
Note:
See TracTickets
for help on using tickets.
This has been clarified.