As with jQuery, it seems you can achieve this by changing the attr called "disabled" (works in my Safari, OK, we are now in 2013 :-)). Example below:
def get_form(self, request, obj=None, **kwargs): result = super(<your ModelAdmin class here>, self).get_form(request, obj=obj, **kwargs) result.base_fields[<the select field you want to disable>].widget.attrs['disabled'] = 'disabled' return result
lai Jun 13 '13 at 13:11 2013-06-13 13:11
source share