Django keyword reject argument 'disabled'

I try make 2 fields in fieldset possible to edit (others should be only visible), but I have problem with parameters:

my code:

    def get_fieldsets(self, request, obj=None):
        fieldsets = self.fieldsets
        if request.user.groups.filter(name='copywriter').exists():
            editable_fields = ['author', 'month']
            readonly_fields = [field for field in self.fieldsets[0][1]['fields'] if field not in editable_fields]
            fieldsets = [(None, {'fields': editable_fields})] + [(None, {'fields': readonly_fields, 'disabled': True})]
        return fieldsets

But anytime when I go to record view, I see "Fieldset.init() got an unexpected keyword argument 'disabled'" error.

How can I fix it?

I don't know where exactly is error, I'm using keyword from documentation, but it doesn't work.

Back to Top