Hi, I would like to set some fields to be readonly in the Admin app based on some logic, and would like to use the new readonly_fields attribute of ModelAdmin if possible (rather than some other sort of hack).
I'm trying to access readonly_fields, but get the error "'GalleryForm' object has no attribute 'readonly_fields'" My code is currently as follows: class GalleryAdminForm(forms.ModelForm): class Meta: model = Gallery def __init__(self, *args, **kwargs): super(GalleryAdminForm, self).__init__(*args, **kwargs) print self.readonly_fields Any help on how I can access readonly_fields from the ModelForm to override it would be really helpful! Thanks, Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.