def get_fieldsets(self, request, obj=None):
        ''' Override polymorphic default to put the subclass-specific fields first '''
        # If subclass declares fieldsets, this is respected
        if (hasattr(self, 'declared_fieldset') and self.declared_fieldsets) \
           or not self.base_fieldsets:
            return super(PolymorphicChildModelAdmin, self).get_fieldsets(request, obj)

        other_fields = self.get_subclass_fields(request, obj)

        if other_fields:
            return (
                (self.extra_fieldset_title, {'fields': other_fields}),
            ) + self.base_fieldsets
        else:
            return self.base_fieldsets
def get_fieldsets ( self , request , obj = None ) : if ( hasattr ( self , 'declared_fieldset' ) and self . declared_fieldsets ) or not self . base_fieldsets : return super ( PolymorphicChildModelAdmin , self ) . get_fieldsets ( request , obj ) other_fields = self . get_subclass_fields ( request , obj ) if other_fields : return ( ( self . extra_fieldset_title , { 'fields' : other_fields } ) , ) + self . base_fieldsets else : return self . base_fieldsets
Override polymorphic default to put the subclass-specific fields first