1👍
✅
Since data_type
is not a model field, that will not work. You need to remove the field in __init__
:
class DetailForm(ParentForm):
def __init__(self, *args, **kwargs):
super(DetailForm, self).__init__(*args, **kwargs)
del self.fields['data_type']
Source:stackexchange.com