From 57a4f20446579e359f775eb613fd004913d48880 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Mon, 13 Feb 2017 15:29:24 -0200 Subject: [PATCH] =?UTF-8?q?Redirect=20ap=C3=B3s=20post?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/painel/views.py | 4 ++++ sapl/templates/painel/voto_nominal.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sapl/painel/views.py b/sapl/painel/views.py index cbdc94335..30f2d6518 100644 --- a/sapl/painel/views.py +++ b/sapl/painel/views.py @@ -1,3 +1,5 @@ +from django.http.response import HttpResponseRedirect +from django.core.urlresolvers import reverse from datetime import date from sapl.utils import get_client_ip @@ -115,6 +117,8 @@ def votante_view(request, pk): voto.voto = request.POST['voto'] voto.ip = get_client_ip(request) voto.save() + return HttpResponseRedirect( + reverse('sapl.painel:voto_individual', kwargs={'pk': pk})) return render(request, 'painel/voto_nominal.html', context) diff --git a/sapl/templates/painel/voto_nominal.html b/sapl/templates/painel/voto_nominal.html index a4c5876e2..b6082d274 100644 --- a/sapl/templates/painel/voto_nominal.html +++ b/sapl/templates/painel/voto_nominal.html @@ -54,7 +54,7 @@ - +