別のテンプレート名を使用するためにフォーム ウィザードを使用しようとしていますが、単純なように見える理由がわからないエラーが表示されます。
ビュー.py
from django.http import HttpResponseRedirect
from django.contrib.formtools.wizard.views import SessionWizardView
FORMS = [("customer", solution.forms.customerForm), //got error undefined variables:solution
("building", solution.forms.buildingForm)]
TEMPLATES = {"customer": "customer.html",
"building": "building.html",
}
class customerWizard(SessionWizardView):
def get_template_names(self):
return [TEMPLATES[self.steps.current]]
def done(self, form_list, **kwargs):
do_something_with_the_form_data(form_list) //get error undefined variables
return HttpResponseRedirect('/page-to-redirect-to-when-done/')