Question

I have wizard implemented with SessionWizardView and I am doing some backend validation and other method calls on every step (e.g. inside form init, clean methods or inside process_step). So actually I do not need to submit all forms and save data from all steps at the end of my wizard. I just need to be redirected to main page after last step. What is best way to do that? Override something like render_done()? Any suggestions?

Was it helpful?

Solution

Looks like overriding render_done() method works great. But my problem was all about validation. I had field where validator was checking if user exists. If it does not - he was created on that step. So revalidation will alway fail here :). Remvoing this code:

if not form_obj.is_valid():
    return self.render_revalidation_failure(form_key, form_obj, **kwargs)

solved revalidation issue at the wizard end.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top