Opened 16 years ago
Closed 16 years ago
#12136 closed (duplicate)
Minor visual problem in django admin (and correction)
| Reported by: | deltoide | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Keywords: | admin contrib | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
When I use callables in the 'list_display' property of the Admin class, the header columns (names of those properties) are not displayed correctly (see screenshot here: http://bit.ly/1bVz1R).
After investigating a little I found that it was because a missing property (class_attrib) of the header object:
This correction works for me (file: admin_list.py in django/contrib/admin/templatetags/, line 116):
# It is a non-field, but perhaps one that is sortable
admin_order_field = getattr(attr, "admin_order_field", None)
if not admin_order_field:
yield {"text": header,
"class_attrib": "", # line added
}
continue
Change History (2)
follow-up: 2 comment:1 by , 16 years ago
comment:2 by , 16 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Small precision: the problem is only there if TEMPLATE_STRING_IF_INVALID is set to something other than .