Python 如何将django向导与窗体一起用作类属性?
我在Django表单向导方面遇到了一些问题 的特定部分表示可以将表单列表作为类属性传递,如下所示:Python 如何将django向导与窗体一起用作类属性?,python,django,wizard,django-formwizard,Python,Django,Wizard,Django Formwizard,我在Django表单向导方面遇到了一些问题 的特定部分表示可以将表单列表作为类属性传递,如下所示: class ContactWizard(WizardView): form_list = [ContactForm1, ContactForm2] 但它没有给出如何在url.py中调用该函数的示例,因此我尝试的每次迭代都会出现以下错误: AssertionError at /create/thing at least one form is needed 我试过这些: url(r'^c
class ContactWizard(WizardView):
form_list = [ContactForm1, ContactForm2]
但它没有给出如何在url.py
中调用该函数的示例,因此我尝试的每次迭代都会出现以下错误:
AssertionError at /create/thing
at least one form is needed
我试过这些:
url(r'^create/thing$', views.ThingWizard.as_view),
# TypeError
object of type 'WSGIRequest' has no len()
url(r'^create/thing$', views.ThingWizard.as_view()),
# AssertionError
at least one form is needed
url(r'^create/thing$', views.ThingWizard),
# TypeError __init__() takes exactly 1 argument
url(r'^create/thing$', views.ThingWizard()),
# AttributeError at /create/thing
'ThingWizard' object has no attribute 'rindex'
有什么提示吗?这里没什么,伙计们,这只是一个简单的打字错误 作为将来的参考,其
表单列表
不是表单列表