mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Merge pull request #834 from vdboor/issue_19906_list_classes
Added column-<field_name> classes to the admin list
This commit is contained in:
@@ -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``
|
||||
|
||||
@@ -101,6 +101,9 @@ Minor features
|
||||
context through to feed templates using a new `Feed.get_context_data()`
|
||||
callback.
|
||||
|
||||
* The admin list columns have a ``column-<field_name>`` class in the HTML
|
||||
so the columns header can be styled with CSS, e.g. to set a column width.
|
||||
|
||||
Backwards incompatible changes in 1.6
|
||||
=====================================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user