#34922 closed New feature (wontfix)
Add dynamic HTML/CSS classes to table row elements in admin changelist view
Reported by: | thebugcollector | Owned by: | thebugcollector |
---|---|---|---|
Component: | contrib.admin | 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
It would be useful to be able to set custom HTML/CSS class attributes to the table row elements <tr>
in the admin changelist view.
The specific CSS class attributes should be able to depend on the object in each row.
Change History (3)
comment:1 by , 13 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
follow-up: 3 comment:2 by , 13 months ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
comment:3 by , 13 months ago
Replying to David Sanders:
Thanks for the report however you can do this by overriding one of the many templates that
contrib.admin
uses, most likelyadmin/change_list_results.html
.
Additionally, all feature requests must be posted on the Django Forum in order to be voted on https://code.djangoproject.com/wiki/DevelopersMailingList 👍
Thanks. For anyone who is interested in this feature, it can be achieved with template overrides but also requires changes to the template tags (specifically result_list
) so that the CSS classes are passed through along with table row content.
Thanks for the report however you can do this by overriding one of the many templates that
contrib.admin
uses, most likelyadmin/change_list_results.html
.Additionally, all feature requests must be posted on the Django Forum in order to be voted on https://code.djangoproject.com/wiki/DevelopersMailingList 👍