class FooAdminForm(forms.ModelForm):
    name = forms.CharField(max_length=100, widget=forms.TextInput(attrs={
        'readonly': 'readonly'}))

def __init__(self, *args, **kwargs):
    super(FooAdminForm, self).__init__(*args, **kwargs)
self.fields['name'].required = False
if 'instance' in kwargs:
    instance = kwargs['instance']


class Meta:
    model = Foo


class FooAdmin(admin.ModelAdmin):
    form = FooAdminForm
fieldsets = None, {'fields': ('id', 'name')}
readonly_fields = 'id',
Добавьте пользовательский HTML-код между двумя полями модели в форме change_form администратора Django.