mirror of
https://github.com/django/django.git
synced 2025-07-23 05:05:17 +00:00
Add column-<field_name> classes to the admin list
This simplifies CSS styling to set column widths.
This commit is contained in:
parent
8503120c10
commit
b7ba4fc408
3 changed files with 13 additions and 3 deletions
|
@ -543,6 +543,13 @@ subclass::
|
|||
The above will tell Django to order by the ``first_name`` field when
|
||||
trying to sort by ``colored_first_name`` in the admin.
|
||||
|
||||
* .. versionadded:: 1.6
|
||||
|
||||
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 for example.
|
||||
|
||||
|
||||
.. attribute:: ModelAdmin.list_display_links
|
||||
|
||||
Set ``list_display_links`` to control which fields in ``list_display``
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue