Re: overwrite the save method

2010-08-11 Thread Nick
You override the save in two places, in the form itself or in the view. Either one would work, you could combine the two as well. the form save override would look something like def save(self): formatform = super(FormFormat, self).save(commit=False) if formatform.boolean1 and formatform.

Re: overwrite the save method

2010-08-11 Thread Roald de Vries
On Aug 11, 2010, at 7:25 PM, refreegrata wrote: My code -- class Format(models.Model): name = models.CharField(max_length=5, unique=True) myBoolean = models.BooleanField(default=False) class FormFormat(forms.ModelForm): boolean1 = forms.BooleanField(requi

Re: overwrite the save method

2010-08-11 Thread bagheera
-- class Format(models.Model): name = models.CharField(max_length=5, unique=True) myBoolean = models.BooleanField(default=False) class FormFormat(forms.ModelForm): boolean1 = forms.BooleanField(required=False) boolean2 = forms.BooleanField(required=

overwrite the save method

2010-08-11 Thread refreegrata
Hello list, i have a newbie question My code -- class Format(models.Model): name = models.CharField(max_length=5, unique=True) myBoolean = models.BooleanField(default=False) class FormFormat(forms.ModelForm): boolean1 = forms.BooleanField(required=False