Re: Make a model form field not required

2014-05-16 Thread Brendan Edwards
Works like a charm, but I don't completely understand why that is necessary. When I defined the text input as hidden and disabled, it overwrote the initial settings of that field? what exactly does this line do? def __init__(self, *args, **kwargs): forms.ModelForm.__init__(self

Re: Make a model form field not required

2014-05-16 Thread Sergej Peleshok
Now you just redefine fields with required=True by default. You need update widgets in __init__. class startRound(forms.ModelForm): class Meta: model = parentRounds def __init__(self, *args, **kwargs): forms.ModelForm.__init__(self, *args, **kwargs) self