Opened 9 years ago

Last modified 20 months ago

#26761 closed New feature

Admin - add 'help_text' property to custom fields — at Initial Version

Reported by: Derek Hohls Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: Guille López, Carlton Gibson, Carsten Fuchs Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top