1
0
mirror of https://github.com/django/django.git synced 2025-05-01 20:54:38 +00:00

[1.10.x] Doc'd how ModelAdmin.list_display uses short_description.

Backport of 8ab8a8910c6f9382610cba5b06ac5c110d52b4b2 from master
This commit is contained in:
Javier Rojas 2016-12-12 00:51:23 -05:00 committed by Tim Graham
parent 4086ff9ecb
commit bb9c9103e5

View File

@ -634,6 +634,10 @@ subclass::
:func:`~django.utils.html.format_html_join`, or
:func:`~django.utils.safestring.mark_safe` instead.
* As some examples have already demonstrated, when using a callable, a
model method, or a ``ModelAdmin`` method, you can customize the column's
title by adding a ``short_description`` attribute to the callable.
* If the value of a field is ``None``, an empty string, or an iterable
without elements, Django will display ``-`` (a dash). You can override
this with :attr:`AdminSite.empty_value_display`::