Browse Source

Fix top tools menu (user, etc) of cart views (was missing)

producao
Marcio Mazza 10 years ago
parent
commit
36ac7b6a70
  1. 5
      sigi/apps/casas/views.py
  2. 5
      sigi/apps/convenios/views.py
  3. 18
      sigi/apps/parlamentares/views.py

5
sigi/apps/casas/views.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from django.http import HttpResponse, HttpResponseRedirect from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response from django.shortcuts import render
from geraldo.generators import PDFGenerator from geraldo.generators import PDFGenerator
from sigi.apps.casas.models import CasaLegislativa, Funcionario from sigi.apps.casas.models import CasaLegislativa, Funcionario
@ -105,7 +105,8 @@ def visualizar_carrinho(request):
carrinhoIsEmpty = not('carrinho_casas' in request.session) carrinhoIsEmpty = not('carrinho_casas' in request.session)
return render_to_response( return render(
request,
'casas/carrinho.html', 'casas/carrinho.html',
{ {
'MEDIA_URL': settings.MEDIA_URL, 'MEDIA_URL': settings.MEDIA_URL,

5
sigi/apps/convenios/views.py

@ -1,6 +1,6 @@
#-*- coding:utf-8 -*- #-*- coding:utf-8 -*-
from django.http import HttpResponse, HttpResponseRedirect from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response, get_list_or_404 from django.shortcuts import render, get_list_or_404
from geraldo.generators import PDFGenerator from geraldo.generators import PDFGenerator
from sigi.apps.convenios.models import Convenio, Projeto from sigi.apps.convenios.models import Convenio, Projeto
from sigi.apps.convenios.reports import ConvenioReport \ from sigi.apps.convenios.reports import ConvenioReport \
@ -130,7 +130,8 @@ def visualizar_carrinho(request):
carrinhoIsEmpty = not('carrinho_convenios' in request.session) carrinhoIsEmpty = not('carrinho_convenios' in request.session)
return render_to_response( return render(
request,
'convenios/carrinho.html', 'convenios/carrinho.html',
{ {
'MEDIA_URL': settings.MEDIA_URL, 'MEDIA_URL': settings.MEDIA_URL,

18
sigi/apps/parlamentares/views.py

@ -6,7 +6,7 @@ import ho.pisa as pisa
from django.template import Context, loader from django.template import Context, loader
from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.core.paginator import Paginator, InvalidPage, EmptyPage
from django.conf import settings from django.conf import settings
from django.shortcuts import render_to_response, get_list_or_404 from django.shortcuts import render, get_list_or_404
from django.http import HttpResponse, HttpResponseRedirect from django.http import HttpResponse, HttpResponseRedirect
from django.views.decorators.csrf import csrf_protect from django.views.decorators.csrf import csrf_protect
from django.template import RequestContext from django.template import RequestContext
@ -54,12 +54,16 @@ def visualizar_carrinho(request):
carrinhoIsEmpty = not('carrinho_parlamentares' in request.session) carrinhoIsEmpty = not('carrinho_parlamentares' in request.session)
return render_to_response('parlamentares/carrinho.html', return render(
{'MEDIA_URL': settings.MEDIA_URL, request,
'carIsEmpty': carrinhoIsEmpty, 'parlamentares/carrinho.html',
'paginas': paginas, {
'query_str': '?' + request.META['QUERY_STRING']}, 'MEDIA_URL': settings.MEDIA_URL,
context_instance=RequestContext(request)) 'carIsEmpty': carrinhoIsEmpty,
'paginas': paginas,
'query_str': '?' + request.META['QUERY_STRING']
}
)
def carrinhoOrGet_for_qs(request): def carrinhoOrGet_for_qs(request):

Loading…
Cancel
Save