This question is strongly related to the one that was previously asked and answered here: How to transfer FormWizard to a view?
Can someone post accurate information on how they successfully completed the creation of the Django Form View wizard so that the login_required decorator can be used? There are many discussions on this topic on the Internet, but they all seem to be incomplete, because they actually do not show how they defined their Wizard class.
When I launch my browser item in the view, I get the following exception:
__init__() takes exactly 1 non-keyword argument (2 given) in views.py line
What arguments do I pass when I instantiate the Wizard object so that it does not give me this error? If you have sample code that works, submit it.
Here is what in my urls.py file:
url(r'^createObject/$', views.createObjectView, name='createObject'),
Here is what in my view.py file:
CREATE_OBJECT_FORMS = [ ("createMyForm0", createObjectForm0), ("createMyForm1", createObjectForm1), ("createMyForm2", createObjectForm2), ("createMyForm3", createObjectForm3), ] CREATE_OBJECT_TEMPLATES = { "createMyForm0": "myApp/form0.html", "createMyForm1": "myApp/form1.html", "createMyForm2": "myApp/form2.html", "createMyForm3": "myApp/form3.html", } @login_required def createObjectView(request):