Browse Source

Fix #99

pull/109/head
Lude Ribeiro 3 years ago
parent
commit
0682c015e6
  1. 5
      sigi/apps/casas/views.py
  2. 4
      sigi/apps/convenios/views.py

5
sigi/apps/casas/views.py

@ -2,6 +2,8 @@
import csv import csv
from datetime import datetime from datetime import datetime
from functools import reduce from functools import reduce
from django.contrib import messages
from sigi.apps.utils import to_ascii from sigi.apps.utils import to_ascii
from geraldo.generators import PDFGenerator from geraldo.generators import PDFGenerator
@ -446,7 +448,8 @@ def visualizar_carrinho(request):
def excluir_carrinho(request): def excluir_carrinho(request):
if 'carrinho_casas' in request.session: if 'carrinho_casas' in request.session:
del request.session['carrinho_casas'] del request.session['carrinho_casas']
return HttpResponseRedirect('.') messages.info(request, u'O carrinho foi esvaziado')
return HttpResponseRedirect('../../')
@login_required @login_required

4
sigi/apps/convenios/views.py

@ -2,6 +2,7 @@
import csv import csv
import datetime import datetime
from django.contrib import messages
from django.http.response import HttpResponseForbidden from django.http.response import HttpResponseForbidden
import ho.pisa as pisa import ho.pisa as pisa
from django.conf import settings from django.conf import settings
@ -114,7 +115,8 @@ def adicionar_convenios_carrinho(request, queryset=None, id=None):
def excluir_carrinho(request): def excluir_carrinho(request):
if 'carrinho_convenios' in request.session: if 'carrinho_convenios' in request.session:
del request.session['carrinho_convenios'] del request.session['carrinho_convenios']
return HttpResponseRedirect('.') messages.info(request, u'O carrinho foi esvaziado')
return HttpResponseRedirect('../../')
@login_required @login_required
def deleta_itens_carrinho(request): def deleta_itens_carrinho(request):

Loading…
Cancel
Save