﻿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
6893	FormWizard does not set the step value correctly	siddhi	anonymous	"The !FormWizard class in django.contrib.formtools.wizard has a method called get_template which can be overridden to return a template for each step of the form submission process. This get_template method gets the step value as a parameter. However, no matter what step of the form processing we are in, this parameter is always 0.

The step value everywhere else is either computed dynamically or passed as a parameter. Only the get_template call uses self.step which is initialised to 0 and then never set again as we move through the steps.

The patch contains two fixes: 

 1. The call to get_template uses the step that is passed as a parameter (and has the correct value) instead of using self.step
 1. self.step is updated at the end of processing

The patch also contains two test cases to check this. One of the tests should fail with the old code. Both tests should pass with the patched code.

As an aside, self.step is now used only in the repr method, so maybe it can be removed from there and then removed entirely from the FormWizard class?

"		closed	contrib.formtools	dev		fixed	form wizard formtools contrib	join.together@… newijk@… v.oostveen@… adam@… mpjung@… philipp@… rokclimb15@… bthomas@…	Accepted	1	0	0	0	0	0
