#33398: ModelAdmin.empty_value_display documentation
-----------------------------------------+------------------------
Reporter: Michael | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 4.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-----------------------------------------+------------------------
Firstly, the documentation is great. In the
[https://docs.djangoproject.com/en/4.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.empty_value_display
admin site docs], it has this example:
{{{
from django.contrib import admin
class AuthorAdmin(admin.ModelAdmin):
fields = ('name', 'title', 'view_birth_date')
@admin.display(empty_value='???')
def view_birth_date(self, obj):
return obj.birth_date]
}}}
I think this will only work for the list display, not setting the empty
value of the field during edit view.
Hence I think
{{{
fields = ('name', 'title', 'view_birth_date')
}}}
should become
{{{
list_display = ('name', 'title', 'view_birth_date')
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33398>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.823915dc2e00fddae1d93c2d61508432%40djangoproject.com.