﻿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
8385	Issue with step parameter's value when overriding get_template method of FormWizard class.	wpatyna	nobody	"I found some issue when I was trying to use FormWizard's child class with overriden get_template method.
The problem was with the value of step parameter used to determine custome template for particular step. This parameter is always 0, no matter which current step is. When I browse the source of the FormWizard class I found that self.step is never update and the issue comes from calling:
       
{{{
 return render_to_response(self.get_template(self.step), dict(context,
            step_field=self.step_field_name,
            step0=step,
            step=step + 1,
            step_count=self.num_steps(),
            form=form,
            previous_fields=previous_fields
        ), context_instance=RequestContext(request))

}}}

Quick fix is to change above code to:

{{{
        return render_to_response(self.get_template(step), dict(context,
            step_field=self.step_field_name,
            step0=step,
            step=step + 1,
            step_count=self.num_steps(),
            form=form,
            previous_fields=previous_fields
        ), context_instance=RequestContext(request))

}}}

(Changed self.step to step when calling get_template method)

I hope I haven't misunderstand some trick ;)"		closed	contrib.formtools	dev		duplicate			Fixed on a branch	0	0	0	0	0	0
