formfield_overrides is just too global and redefining form fields has many drawbacks (loss of original field arguments for example and ModelForm magic). What do we do? I keep forgetting about the ModelForm meta class widget attribute.
The ModelForm meta class takes a widget attribute which is a map of fieldnames to widgets:
class OrderForm(forms.ModelForm):
class Meta:
model = Order
widgets = {
'activity': forms.Textarea(attrs={'disabled': True}),
'log': forms.Textarea(attrs={'disabled': True}),
}
class MyAdmin(admin.ModelAdmin):
form = OrderForm