Improved @display(empty_value) example in ModelAdmin.empty_value_display docs.

This commit is contained in:
mangelozzi 2021-12-30 12:39:04 +02:00 committed by GitHub
parent 6174814dbe
commit eb901681ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,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):