An admin form is created dynamically from the metaclass when add_view or change_view is called (see the adminForm variable in django/contrib/admin/options.py ).
So the easiest workaround is to put None in the fieldset label:
class ObservableAdmin(MPTTModelAdmin): form=ObservableAdminForm fieldsets =[('other fields',{}), (None, {'fields':('constraints',)}),] readonly_fields = ['constraints']
Alternatively, you can set an empty label using the verbose_name attribute in the model field declaration:
class Observable(Model): constraints=ManyToManyField('Constraint', verbose_name='')
but you cannot remove the label suffix (':') because it is fixed in the code ( django/contrib/admin/helpers.py ).
I prefer the first solution whenever possible (the appropriate label is needed for a set of fields if you want to hide it with collapse ).
source share