Remove fields from ModelForm

前端 未结 5 983
忘掉有多难
忘掉有多难 2020-12-09 06:16

i have a simple ModelForm:

class MyForm(ModelForm):

    def __init__(self, *args, **kwargs):
        super(MyForm, self).__init__(*args, **kwargs)
        d         


        
5条回答
  •  死守一世寂寞
    2020-12-09 06:35

    One cause I can think of is if your ModelAdmin class which uses your custom form has conflicting settings. For example if you have also explicitly specified 'name' field within 'fields' or 'fieldsets' of your ModelAdmin.

提交回复
热议问题