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 7363,"Form wizard has a bug in get_template(self, step). The 'step' variable is always 0, it never gets incremented.",Tyson Wenger ,nobody,"When I override this function below, the ""step"" variable always stays set to 0. It never gets updated. Therefore only my template_0.html gets loaded. I want it to continue down the line like template_0.html, template_1.html, ...and so on. def get_template(self, step): return 'vlis/production/order/template_%s.html' % step Unless I am really mistaken and doing something wrong, I am pretty sure this is a bug. The ""self.step"" variable in ""wizard.py"" is never being updated after the forms are submitted from one page to the next. These are two possible fixes I found that might work: 1. In the method ""def __call__(self, request, *args, **kwargs) :"" update the self.step variable after the is_valid() function is checked. ******Coding**************** Revision: if form.is_valid(): ...... if next_step == num: ..... else: form = self.get_form(next_step) current_step = next_step self.step = current_step #new code here 2. In the method ""def render_template(self, request, form, previous_fields, step, context=None):"" replace ""self.step"" with the functions ""step"" argument value instead. ****Coding***************** Previous: context.update(self.extra_context) return render_to_response(self.get_template(self.step), dict(context,... Revision: context.update(self.extra_context) return render_to_response(self.get_template(step), dict(context,... If anyone can verify that they have the same problem, I will submit this to a bug fix. Thanks. ",,closed,Uncategorized,dev,,duplicate,,,Unreviewed,0,0,0,0,0,0