#26761: Add 'help_text' property to methods in ModelAdmin.list_display
-------------------------------+------------------------------------
     Reporter:  gamesbook      |                    Owner:  nobody
         Type:  New feature    |                   Status:  new
    Component:  contrib.admin  |                  Version:  1.9
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------
Changes (by timgraham):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * keywords:  admin =>
 * needs_docs:   => 0
 * stage:  Unreviewed => Accepted


Old description:

> It would be helpful to allow for a `help_text` property to be supplied to
> a custom field in the admin.
>
> For example:
>
> {{{
> from django.contrib import admin
>
> class AuthorAdmin(admin.ModelAdmin):
>     fields = ('name', 'title', 'view_birth_date')
>
>     def view_birth_date(self, obj):
>         return obj.birth_date
>
>     view_birth_date.short_name = 'birth_date'
>     view_birth_date.empty_value_display = '???'
>     view_birth_date.help_text = 'Authors birthday'
> }}}
>
> This help text could be displayed via a 'hover over' in the header(s) of
> the columns in the admin list display.

New description:

 It would be helpful to allow for a `help_text` property to be supplied to
 a custom field in the admin.

 For example:

 {{{
 from django.contrib import admin

 class AuthorAdmin(admin.ModelAdmin):
     fields = ('name', 'title', 'view_birth_date')

     def view_birth_date(self, obj):
         return obj.birth_date

     view_birth_date.help_text = 'Authors birthday'
 }}}

 This help text could be displayed via a 'hover over' in the header(s) of
 the columns in the admin list display.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/26761#comment:1>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.c034beea2a4c84b41267f4ff12386d77%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to