I'd like to change the column widths in the list display of the Django admin.
Is it possible somehow to add a CSS classname to a column? I'd preferably not overwrite the entire template to accomplish this.
In Django >= 1.6, CSS classes are included with list_display output:
"The field names in list_display
will also appear as CSS classes in the HTML output, in the form of column-<field_name>
on each <th>
element. This can be used to set column widths in a CSS file."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With