Hello, I am a python/django newbie trying to accomplish the task below. Any help will be greatly appreciated. I have a model with around 50 or so fields. I need to break them up and provide a wizard like functionality.
class ABC(models.Model): field_1 = models.IntegerField('Field 1') field_2 = models.CharField('Field 2') .. .. field_50 =
Now in my view I create several forms with a subset of the fields like so
class WizardPage1(forms.ModelForm):
def clean(self):
cleaned_data = self.cleaned_data
return cleaned_data
class Meta:
model = ABC
fields = ('field_1', 'field_2', 'etc'')
)
class WizardPage2(forms.ModelForm):
def clean(self):
cleaned_data = self.cleaned_data
return cleaned_data
class Meta:
model = ABC
fields = ('field_11', 'field_12', 'etc'')
)
When I create a FormWizard with say 5 forms, 5 records get stored. My question is how do I save this into one record?