﻿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
15050	FormWizard URLConf documentation misleading	root+django@…	nobody	"The documentation suggests the following way to plug a FormWizard into the URLConf:

{{{
from django.conf.urls.defaults import *
from testapp.forms import ContactForm1, ContactForm2, ContactWizard

urlpatterns = patterns('',
    (r'^contact/$', ContactWizard([ContactForm1, ContactForm2])),
)
}}}

Unfortunately, this causes a single instance of the wizard to serve the whole application. Basically, all instance attributes are shared between all visitors (e.g. self.step, so the wizard is effectively unusable).

To make the wizard handle every request in a dedicated instance, a wrapper function could be used, a'la:

{{{
def contact_wizard(request, *args, **kwargs):
    wizard = ContactWizard([ContactForm1, ContactForm2])
    return wizard(request, *args, **kwargs)

urlpatterns = patterns('',
    (r'^contact/$', contact_wizard),
)
}}}"	Bug	closed	contrib.formtools	1.2	Normal	fixed	wizard		Accepted	0	0	0	0	0	0
