Is possible that the steps of the wizard are dynamic? For example, the second step occur repeatedly n times?
I struggled with this problem too. Tommaso Barbugli is right about creating a factory for the class. I'm currently working with Django 1.6.
in the url, include this:
url('/create_wizard/', factory_wizard, name='factory_wizard')
this is the factory:
class WizardClass(SessionWizardView):
...
def factory_wizard(request, *args, **kwargs):
parameter_to_know_which_step_number = # I let you implement this one ( I did it by the session data )
ret_form_list = [FirstFormClass, SecondFormClass]
for _ in range(parameter_to_know...):
form_list.append(SecondFormClass)
class ReturnClass(WizardClass):
form_list = ret_form_list
return ReturnClass.as_view()(request, *args, **kwargs)