How do I save the form_data to a database?
forms.py
class ContactWizard(SessionWizardView):
template_name ='fitness/general.html'
def done(self, form_list, **kwargs):
form_data = process_form_data(form_list)
return render_to_response('fitness/general2.html', {'form_data': form_data})
def process_form_data(form_list):
form_data = [form.cleaned_data for form in form_list]
return form_data
I have encountered this problem before while doing an online resume builder
I believe this code may help you. It does nothing extra, as form_data contains all the forms, you can get them by indexing. Of course you can use loop but usually different forms may require different procedures.