#23588 closed Cleanup/optimization (fixed)
list_display method attributes description links
Reported by: | eliasvc | Owned by: | Curtis Maloney |
---|---|---|---|
Component: | Documentation | Version: | 1.7 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | yes |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hello,
This is a piece of code that first describe the use of method attributes in callback functions used in list_display on Django tutorial, page two https://docs.djangoproject.com/en/1.7/intro/tutorial02/
class Question(models.Model): # ... def was_published_recently(self): return self.pub_date >= timezone.now() - datetime.timedelta(days=1) was_published_recently.admin_order_field = 'pub_date' was_published_recently.boolean = True was_published_recently.short_description = 'Published recently?'
The problem is none of those method attribute definitions take you somewhere where it describes what they do. It can be very confusing for a person starting out. In fact, it would be awesome if there was some kind of index of method attributes one can use since their descriptions on the admin page are scattered.
Change History (4)
comment:1 by , 10 years ago
Needs documentation: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
The simplest solution is to just add a link after this along the lines of:
linking to the Admin.list_options doco. There's an earlier link where it's mentioned the first time, but it doesn't hurt to reinforce.