From 225328efd9814f2e922ee77fb48a3eea7428c397 Mon Sep 17 00:00:00 2001 From: Ryanwalker277 Date: Thu, 14 Sep 2023 17:40:20 +0530 Subject: Fixed #31558 -- Added support for boolean attribute on properties in ModelAdmin.list_display. --- docs/ref/contrib/admin/index.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs/ref') diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index aa30c413fa..79345ea3d1 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -796,6 +796,7 @@ subclass:: @admin.display( ordering="last_name", description="Full name of the person", + boolean=False, ) def full_name(self): return self.first_name + " " + self.last_name @@ -816,9 +817,14 @@ subclass:: my_property.short_description = "Full name of the person" my_property.admin_order_field = "last_name" + my_property.boolean = False full_name = property(my_property) + .. versionchanged:: 5.0 + + Support for ``boolean`` attribute on properties was added. + * The field names in ``list_display`` will also appear as CSS classes in the HTML output, in the form of ``column-`` on each ```` element. This can be used to set column widths in a CSS file for example. -- cgit v1.3