I\'m trying to make all fields readonly without listing them explicitly.
Something like:
class CustomAdmin(admin.ModelAdmin): def get_readonly_fi
With get_fieldsets you get all fields from the form
def get_readonly_fields(self, request, obj=None): readonly = [] for fs in self.get_fieldsets(request, obj): if len(fs) > 1: readonly += fs[1].get('fields', []) return readonly