[Answer]-Django FormWizard – show summary when done

1πŸ‘

βœ…

You could also save the formdata in a session, and retrieve that info when calling the confirmation.html view.

If you use this I would advise to set SESSION_EXPIRE_AT_BROWSER_CLOSE = True or an expire time for the session.

πŸ‘€het.oosten

0πŸ‘

I think you can do like this.

def done(self, form_list, **kwargs):
    info = self.save_info(form_list[0])
    extra = self.save_extra(info, form_list[1])
    # how to provide context for redirect?
    # return redirect('confirmation.html')
    # this works, but uses POST
    form_list=[form.cleaned_data for form in form_list]

    return HttpResponseRedirect("/url/"+form_list)
πŸ‘€tom joy

Leave a comment