Use a TemplateResponse instead of render() on done step
authorGu1 <gu1@cafai.fr>
Sun, 14 Apr 2013 03:05:12 +0000 (05:05 +0200)
committerGu1 <gu1@cafai.fr>
Sun, 14 Apr 2013 03:05:12 +0000 (05:05 +0200)
fdneligibility/views.py

index a1c52b0..8a41dd0 100644 (file)
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 from django.contrib.formtools.wizard.views import SessionWizardView
 from django.utils.translation import ugettext_lazy as _
-from django.shortcuts import render
+from django.template.response import TemplateResponse
 from forms import EligibilityForm1, EligibilityForm2
 from utils import VerifiedHTTPSConnection, APP_ROOT
 from httplib import HTTPException
@@ -124,7 +124,7 @@ class EligibilityWizard(SessionWizardView):
         si_res=self.storage.extra_data['si_res']
         _chosen_plan=forms_data[self.steps.step0]['plans']
         chosen_plan=filter(lambda o: o['plan_id']==_chosen_plan, si_res['offres'])[0]
-        return render(self.request, 'fdneligibility/done.html', {
+        return TemplateResponse(self.request, 'fdneligibility/done.html', {
             'form_data': forms_data,
             'line_info': si_res['info_ligne'],
             'chosen_plan': chosen_plan,