#829 closed defect (duplicate)
__repr__ overloaded for short_descriptions in admin interface
Reported by: | aaronsw | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | contrib.admin | Version: | |
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
The admin interface abuses repr to get its short_descriptions for listing objects. Instead, it should have a new function (perhaps short_description or something like that) to generate these things. Then, perhaps by default, repr can be '<'+classname+': '+short_description+'>' which is much more appropriate for the REPL situations in which repr is traditionally used.
If you have to use a special function, perhaps it could be str.
Note:
See TracTickets
for help on using tickets.
Duplicate of #710.