1
0
mirror of https://github.com/django/django.git synced 2025-07-07 19:29:12 +00:00

[4.0.x] Improved @display(empty_value) example in ModelAdmin.empty_value_display docs.

Backport of eb901681ab58c008f7bbbe555e5f43f8e0893bd3 from main
This commit is contained in:
mangelozzi 2021-12-30 12:39:04 +02:00 committed by Mariusz Felisiak
parent c46e996307
commit b93fb3d6be

View File

@ -248,7 +248,7 @@ subclass::
from django.contrib import admin from django.contrib import admin
class AuthorAdmin(admin.ModelAdmin): class AuthorAdmin(admin.ModelAdmin):
fields = ('name', 'title', 'view_birth_date') list_display = ('name', 'title', 'view_birth_date')
@admin.display(empty_value='???') @admin.display(empty_value='???')
def view_birth_date(self, obj): def view_birth_date(self, obj):