From 65ea7ee82589b77cfe74b8e9831c1342036e270f Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Fri, 23 Oct 2015 13:40:23 -0200 Subject: [PATCH] Change TemplateView to ListView for Proposicoes --- protocoloadm/views.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/protocoloadm/views.py b/protocoloadm/views.py index 0b296dbb1..e1723f14d 100644 --- a/protocoloadm/views.py +++ b/protocoloadm/views.py @@ -508,21 +508,23 @@ class ProposicaoReceberView(TemplateView): template_name = "protocoloadm/proposicao_receber.html" -class ProposicoesNaoRecebidasView(TemplateView): +class ProposicoesNaoRecebidasView(ListView): template_name = "protocoloadm/proposicoes_naorecebidas.html" model = Proposicao paginate_by = 10 def get_queryset(self): - return Proposicao.objects.filter(data_envio__isnull=False, status='E') + return Proposicao.objects.filter(data_envio__isnull=False, + status='E') -class ProposicoesNaoIncorporadasView(TemplateView): +class ProposicoesNaoIncorporadasView(ListView): template_name = "protocoloadm/proposicoes_naoincorporadas.html" model = Proposicao paginate_by = 10 def get_queryset(self): + print('heyt') return Proposicao.objects.filter(data_envio__isnull=False, data_devolucao__isnull=False, status='D')