﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19886	documentation: FormWizard.as_view() does not have the attribute get_form()	gandalf013@…	nobody	"The [https://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/#providing-initial-data-for-the-forms documentation] for form wizards has this example:

{{{
>>> from myapp.forms import ContactForm1, ContactForm2
>>> from myapp.views import ContactWizard
>>> initial = {
...     '0': {'subject': 'Hello', 'sender': 'user@example.com'},
...     '1': {'message': 'Hi there!'}
... }
>>> wiz = ContactWizard.as_view([ContactForm1, ContactForm2], initial_dict=initial)
>>> form1 = wiz.get_form('0')
>>> form2 = wiz.get_form('1')
>>> form1.initial
{'sender': 'user@example.com', 'subject': 'Hello'}
>>> form2.initial
{'message': 'Hi there!'}
}}}

The above example (with the definitions of `ContactForm1`, `ContactForm2`, and `ContactWizard` from earlier) fails:

{{{
AttributeError: 'function' object has no attribute 'get_form'
}}}

It seems like the example assumes that `as_view()` should return an instance of `ContactWizard`, whereas it actually returns a function."	Bug	closed	Documentation	dev	Normal	duplicate			Unreviewed	0	0	0	0	0	0
