Probably a simple question but having trouble implementing a form preview page using django-formtools. I've configured everything per the docs. I'm stuck on what to add to the done() method to save the data to db.
forms.py
class JobForm(ModelForm):
class Meta:
model = Job
fields = ('title', 'category', 'company', 'website', 'description',)
class JobFormPreview(FormPreview):
def done(self, request, cleaned_data):
# add what here to save form data as object?
return HttpResponseRedirect('/success')urls.py
...
url(r'^jobs/new/$',
JobFormPreview(JobForm),
name='job_form'),
...Using the default templates. The form and preview both render fine, but obviously data doesn't save on submit. Tried self.form.save() but get an error save() missing 1 required positional argument: 'self'.
I appreciate any guidance.