﻿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
7169	Minor bug in wizards.py :: render_template	tzellman	nobody	"This is actually only a problem if (a) you are using (or copied) the default render_template, and (b) you are overriding the get_template method to return different pages based on the passed-in step variable. The error is on line 212. The code is currently using the ''self.step'' variable instead of the passed-in step variable. The problem (as you will see) is that the ''self.step'' variable is never mutated, other than in the constructor. Therefore, every time render_template is called, ''self.step'' will be 0, and the 1st template will be requested.

'''Current code:'''
{{{
        return render_to_response(self.get_template(self.step), dict(context,
}}}

'''Proposed fix:'''
{{{
        return render_to_response(self.get_template(step), dict(context,
}}}

In addition, you may consider updating the ''self.step'' value. Currently it doesn't really serve any purpose.

This wasn't a show stopper for me since I provided my own render_template method in my subclass. I just wanted to make you guys aware.

Thanks,
Tom"		closed	contrib.formtools	dev		duplicate	formtools wizard		Unreviewed	0	0	0	0	0	0
