Thanks. That's essentially what I ended up doing just with job =
Job.objects.create(**cleaned_data)
Appreciate your help!
On Thursday, March 9, 2017 at 4:21:13 PM UTC-7, ludovic coues wrote:
>
> Oh, sorry, I didn't notice the form preview functionality.
>
> CreateView simply call form.save()
Oh, sorry, I didn't notice the form preview functionality.
CreateView simply call form.save() but it have access to a ModelForm.
I assume you want to create the object and save it in the done function.
I would try that:
def done(self, request, cleaned_data):
job =
Yeah, that's actually what I was doing before, but as far as I can tell
formtools prevents that possibility. Do you know of some way to create the
desired 'preview page' behavior while using CreateView?
On Thursday, March 9, 2017 at 4:30:26 AM UTC-7, ludovic coues wrote:
>
> If you want to
If you want to create a Job object and save it to database, I highly
recommend the CreateView
https://docs.djangoproject.com/en/1.10/ref/class-based-views/generic-editing/#django.views.generic.edit.CreateView
2017-03-09 2:17 GMT+01:00 jthewriter :
> Probably a simple
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
5 matches
Mail list logo