1

It seems like to that Django admin allows the display of helptext for a model field, but I can't get it to display.

I have an admin interface that looks like

class ModelA():
    name=DecimalField(blehbleh, help_text='some help plz')
    desc=DecimalField(blehbleh, help_text='some other help')

class ModelAInlineAdmin(admin.TabularInline):
    model = ModelA
    formset = ModelAFormSet

class ModelAFormSet(forms.BaseInlineFormSet):
    def clean(self):
        super(ModelAFormSet, self).clean()
        # some validation stuff

class SomeOtherAdmin(admin.ModelAdmin):
    inlines = [ModelAInlineAdmin]
    model = some_other_model

The ModelA's inline shows up in SomeOtherAdmin, but I cannot make the help text (i.e. 'some help plz' and 'some other help') to show.

halfer
  • 19,824
  • 17
  • 99
  • 186
JChao
  • 2,178
  • 5
  • 35
  • 65

1 Answers1

0

I'm not sure if you've ever figured it out, but I'm pretty sure you can't do it just through Django's built-in properties (see another possible idea at the end). The help text in inline admins seems to be applied to the whole column in the form of a tooltip on the column's header (a little question mark which you can hover to see the help_text), instead of individually on each cell.

Another indication that this isn't possible is this old Django ticket: https://code.djangoproject.com/ticket/8190

You could probably try to customize the template in order to have it there, though. This answer seems to suggest a way to do it, although I haven't tried it myself.

Luca Bezerra
  • 1,160
  • 1
  • 12
  • 23