Попробуйте это
class ModelForm(forms.ModelForm)::
def __init__(self, *args, **kwargs):
super(ModelForm, self).__init__(*args, **kwargs)
instance = getattr(self, 'instance', None)
if instance and instance.pk:
self.fields['field_name'].widget.attrs['readonly'] = True
# field_name is the field which you want to make readonly
def clean_field_name(self):
instance = getattr(self, 'instance', None)
if instance and instance.pk:
return instance.field_name
else:
return self.cleaned_data['field_name']