i Created a multi step form but the issues is that i can't save the data to the database and that the purpose of creating the form, please how can i fix this or can anyone help me?
class add_School(SessionWizardView):
template_name = 'schoolprofile.html'
file_storage = FileSystemStorage(location=os.path.join(settings.MEDIA_ROOT, 'images', 'videos'))
def done(self, form_list, form_dict, **kwargs):
form_data = process_data(form_list)
return render('index.html', { 'form_data' :form_data})
def process_data(form_list):
form_data = [form.cleaned_data for form in form_list]
data = ['User', 'School', 'school_data']
send_mail(form_data[0]['Schools'],
form_data[1]['school_data'],
['
tosina...@gmail.com', ], fail_silently = False)
return form_data