編集: FWIW、私はdjango1.3を実行しています
私は持っています...
class CreateProductWizard(FormWizard):
def get_template(self, step):
if step == 1:
return 'product/form_wizard/editor.html'
else:
return 'product/form_wizard/wizard_%s.html' % step
def process_step(self, request, form, step):
if step == 1:
self.extra_context = {'ptype': form.cleaned_data}
return
else:
return
def done(self, request, form_list):
# now that it's all together, store it.
return render_to_response('product/form_wizard/done.html',
{'form_data': [form.cleaned_data for form in form_list]},
context_instance=RequestContext(request))
そして、self.extra_contextをテンプレートに取得したいと思います。
テンプレートでそれを取得するにはどうすればよいですか?
テンプレートを試してみました:
{{extra_context}}
{{form.extra_context}}
{{form.extra_context.ptype}}
等..