Define form_list directly in the WizardView subclass
|Reported by:||BerislavLopac||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently, the list of forms for WizardView is defined as the first parameter of the as_view method, called in the URLconf. It seems to me that it would be more Django-like if it was possible to define it in the view itself, for example as an optional attribute of the form. So it would be possible to define the view like this:
class MyWizardView(WizardView): form_list = [WizardForm1, WizardForm2] def done(self, form_list, **kwargs): return redirect('foo')
Stating forms in the URLconf seems to me plain wrong and non-Djangoish. Of course, it should still be possible to do it (for backward compatibility), in which case the attribute would be ignored.