#26761: Add 'help_text' property to methods in ModelAdmin.list_display
-------------------------------+------------------------------------------
Reporter: Derek Hohls | Owner: Hasan Ramezani
Type: New feature | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------------
Comment (by Hugo Osvaldo Barrera):
I think this ticket somehow manages to mix up two very different requests
into one:
1. Add a `help_text` to methods:
{{{
from django.contrib import admin
class AuthorAdmin(admin.ModelAdmin):
fields = ('name', 'date_of_birth', 'is_underage')
def is_underage(self, obj):
return obj.age < 18
is_underage.help_text = 'Indicates if the author is under 18.'
}}}
2. Show `help_text` as a `title` in `changelist`headers.
As far as I understand the reason to reject this feature request are that
this second feature seems to niche (note: I agree on that).
On the other hand, `help_text` for method-fields seem to make perfect
sense. They would be rendered on the `changeform` just like the
`help_text` for any other readonly field.
They also don't seem niche at all, and align very well with the existing
admin UX.
Do you think just the first item would be acceptable? Looks like the
implementation can be extracted from #12309, excluding the `changelist`
changes.
--
Ticket URL: <https://code.djangoproject.com/ticket/26761#comment:18>
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/067.0b261a69b32593226ced0f9df4256c79%40djangoproject.com.