Repository: ciudadanointeligente/votainteligente-portal-electoral

Issue:
Paso 3 que te aparezca el resultado de la pregunta del paso 2
<!---
@huboard:{"order":0.21846582396300857,"milestone_order":237}
-->



Discussion:

Resolving patch:
diff --git a/popular_proposal/views.py b/popular_proposal/views.py
--- a/popular_proposal/views.py
+++ b/popular_proposal/views.py
@@ -170,7 +170,7 @@ def done(self, form_list, **kwargs):
                                                       data=data)
         t_data.notify_new()
         return render_to_response('popular_proposal/wizard/done.html', {
-            'proposal': t_data,
+            'popular_proposal': t_data,
             'area': self.area
         })
 
@@ -205,10 +205,19 @@ def done(self, form_list, **kwargs):
                                                               area=area,
                                                               data=data)
         return render_to_response('popular_proposal/wizard/done.html', {
-            'proposal': temporary_data,
+            'popular_proposal': temporary_data,
             'area': area
         })
 
+    def get_context_data(self, *args, **kwargs):
+        context = super(ProposalWizardFull, self).get_context_data(*args, **kwargs)
+        data = self.get_all_cleaned_data()
+        if 'area' in data:
+            context['area'] = data['area']
+        context['preview_data'] = self.get_all_cleaned_data()
+        
+        return context
+
 
 class PopularProposalUpdateView(UpdateView):
     form_class = UpdateProposalForm


Test patch:
diff --git a/popular_proposal/tests/wizard_tests.py b/popular_proposal/tests/wizard_tests.py
--- a/popular_proposal/tests/wizard_tests.py
+++ b/popular_proposal/tests/wizard_tests.py
@@ -144,7 +144,7 @@ def test_post_data_to_the_wizard(self):
         self.assertTemplateUsed(response, 'popular_proposal/wizard/done.html')
         # Probar que se creó la promesa
         self.assertEquals(ProposalTemporaryData.objects.count(), 1)
-        temporary_data = response.context['proposal']
+        temporary_data = response.context['popular_proposal']
         self.assertEquals(response.context['area'], self.arica)
         self.assertEquals(temporary_data.proposer, self.feli)
         self.assertEquals(temporary_data.area, self.arica)
@@ -180,13 +180,16 @@ def test_full_wizard(self):
             data = test_response[i]
             data.update({'proposal_wizard_full-current_step': unicode(i)})
             response = self.client.post(url, data=data)
+            self.assertEquals(response.context['area'], self.arica)
+
             if 'form' in response.context:
+                self.assertTrue(response.context['preview_data'])
                 self.assertFalse(response.context['form'].errors)
                 steps = response.context['wizard']['steps']
         self.assertTemplateUsed(response, 'popular_proposal/wizard/done.html')
         # Probar que se creó la promesa
         self.assertEquals(ProposalTemporaryData.objects.count(), 1)
-        temporary_data = response.context['proposal']
+        temporary_data = response.context['popular_proposal']
         self.assertEquals(response.context['area'], self.arica)
         self.assertEquals(temporary_data.proposer, self.feli)
         self.assertEquals(temporary_data.area, self.arica)