@ -515,7 +515,7 @@ class MateriaOrdemDiaCrud(MasterDetailCrud):
form_class = OrdemDiaForm
form_class = OrdemDiaForm
def get_initial ( self ) :
def get_initial ( self ) :
initial = super ( UpdateView , self ) . get_initial ( )
initial = super ( ) . get_initial ( )
initial [ ' tipo_materia ' ] = self . object . materia . tipo . id
initial [ ' tipo_materia ' ] = self . object . materia . tipo . id
initial [ ' numero_materia ' ] = self . object . materia . numero
initial [ ' numero_materia ' ] = self . object . materia . numero
initial [ ' ano_materia ' ] = self . object . materia . ano
initial [ ' ano_materia ' ] = self . object . materia . ano
@ -576,7 +576,7 @@ class ExpedienteMateriaCrud(MasterDetailCrud):
form_class = ExpedienteMateriaForm
form_class = ExpedienteMateriaForm
def get_initial ( self ) :
def get_initial ( self ) :
initial = super ( CreateView , self ) . get_initial ( )
initial = super ( ) . get_initial ( )
initial [ ' data_ordem ' ] = SessaoPlenaria . objects . get (
initial [ ' data_ordem ' ] = SessaoPlenaria . objects . get (
pk = self . kwargs [ ' pk ' ] ) . data_inicio . strftime ( ' %d / % m/ % Y ' )
pk = self . kwargs [ ' pk ' ] ) . data_inicio . strftime ( ' %d / % m/ % Y ' )
max_numero_ordem = ExpedienteMateria . objects . filter (
max_numero_ordem = ExpedienteMateria . objects . filter (
@ -594,7 +594,7 @@ class ExpedienteMateriaCrud(MasterDetailCrud):
form_class = ExpedienteMateriaForm
form_class = ExpedienteMateriaForm
def get_initial ( self ) :
def get_initial ( self ) :
initial = super ( UpdateView , self ) . get_initial ( )
initial = super ( ) . get_initial ( )
initial [ ' tipo_materia ' ] = self . object . materia . tipo . id
initial [ ' tipo_materia ' ] = self . object . materia . tipo . id
initial [ ' numero_materia ' ] = self . object . materia . numero
initial [ ' numero_materia ' ] = self . object . materia . numero
initial [ ' ano_materia ' ] = self . object . materia . ano
initial [ ' ano_materia ' ] = self . object . materia . ano
@ -614,6 +614,41 @@ class OradorCrud(MasterDetailCrud):
class ListView ( MasterDetailCrud . ListView ) :
class ListView ( MasterDetailCrud . ListView ) :
ordering = [ ' numero_ordem ' , ' parlamentar ' ]
ordering = [ ' numero_ordem ' , ' parlamentar ' ]
def get_context_data ( self , * * kwargs ) :
context = super ( ) . get_context_data ( * * kwargs )
sessao_pk = context [ ' root_pk ' ]
sessao = SessaoPlenaria . objects . get ( id = sessao_pk )
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
class CreateView ( MasterDetailCrud . CreateView ) :
form_class = OradorForm
def get_initial ( self ) :
return { ' id_sessao ' : self . kwargs [ ' pk ' ] }
def get_success_url ( self ) :
return reverse ( ' sapl.sessao:orador_list ' ,
kwargs = { ' pk ' : self . kwargs [ ' pk ' ] } )
class UpdateView ( MasterDetailCrud . UpdateView ) :
form_class = OradorForm
def get_initial ( self ) :
initial = super ( ) . get_initial ( )
initial . update ( { ' id_sessao ' : self . object . sessao_plenaria . id } )
initial . update ( { ' numero ' : self . object . numero_ordem } )
return initial
class OradorExpedienteCrud ( OradorCrud ) :
model = OradorExpediente
class CreateView ( MasterDetailCrud . CreateView ) :
class CreateView ( MasterDetailCrud . CreateView ) :
form_class = OradorForm
form_class = OradorForm
@ -621,21 +656,64 @@ class OradorCrud(MasterDetailCrud):
def get_initial ( self ) :
def get_initial ( self ) :
return { ' id_sessao ' : self . kwargs [ ' pk ' ] }
return { ' id_sessao ' : self . kwargs [ ' pk ' ] }
def get_context_data ( self , * * kwargs ) :
context = super ( ) . get_context_data ( * * kwargs )
sessao_pk = context [ ' root_pk ' ]
sessao = SessaoPlenaria . objects . get ( id = sessao_pk )
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
def get_success_url ( self ) :
def get_success_url ( self ) :
return reverse ( ' sapl.sessao:orador_list ' ,
return reverse ( ' sapl.sessao:orador_list ' ,
kwargs = { ' pk ' : self . kwargs [ ' pk ' ] } )
kwargs = { ' pk ' : self . kwargs [ ' pk ' ] } )
class UpdateView ( MasterDetailCrud . UpdateView ) :
class UpdateView ( MasterDetailCrud . UpdateView ) :
form_class = OradorForm
form_class = OradorForm
def get_initial ( self ) :
def get_initial ( self ) :
initial = super ( UpdateView , self ) . get_initial ( )
initial = super ( ) . get_initial ( )
initial . update ( { ' id_sessao ' : self . object . sessao_plenaria . id } )
initial . update ( { ' id_sessao ' : self . object . sessao_plenaria . id } )
initial . update ( { ' numero ' : self . object . numero_ordem } )
initial . update ( { ' numero ' : self . object . numero_ordem } )
return initial
return initial
def get_context_data ( self , * * kwargs ) :
context = super ( ) . get_context_data ( * * kwargs )
sessao_pk = context [ ' root_pk ' ]
sessao = SessaoPlenaria . objects . get ( id = sessao_pk )
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
class DetailView ( MasterDetailCrud . DetailView ) :
def get_context_data ( self , * * kwargs ) :
context = super ( ) . get_context_data ( * * kwargs )
sessao_pk = context [ ' root_pk ' ]
sessao = SessaoPlenaria . objects . get ( id = sessao_pk )
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
class DeleteView ( MasterDetailCrud . DeleteView ) :
def get_context_data ( self , * * kwargs ) :
context = super ( ) . get_context_data ( * * kwargs )
sessao_pk = context [ ' root_pk ' ]
sessao = SessaoPlenaria . objects . get ( id = sessao_pk )
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
class OradorExpedienteCrud ( OradorCrud ) :
class OradorExpedienteCrud ( OradorCrud ) :
model = OradorExpediente
model = OradorExpediente
@ -647,6 +725,17 @@ class OradorExpedienteCrud(OradorCrud):
def get_initial ( self ) :
def get_initial ( self ) :
return { ' id_sessao ' : self . kwargs [ ' pk ' ] }
return { ' id_sessao ' : self . kwargs [ ' pk ' ] }
def get_context_data ( self , * * kwargs ) :
context = super ( ) . get_context_data ( * * kwargs )
pk = context [ ' root_pk ' ]
sessao = SessaoPlenaria . objects . get ( id = pk )
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
def get_success_url ( self ) :
def get_success_url ( self ) :
return reverse ( ' sapl.sessao:oradorexpediente_list ' ,
return reverse ( ' sapl.sessao:oradorexpediente_list ' ,
kwargs = { ' pk ' : self . kwargs [ ' pk ' ] } )
kwargs = { ' pk ' : self . kwargs [ ' pk ' ] } )
@ -659,6 +748,40 @@ class OradorExpedienteCrud(OradorCrud):
' numero ' : self . object . numero_ordem }
' numero ' : self . object . numero_ordem }
class ListView ( MasterDetailCrud . ListView ) :
def get_context_data ( self , * * kwargs ) :
context = super ( ) . get_context_data ( * * kwargs )
pk = context [ ' root_pk ' ]
sessao = SessaoPlenaria . objects . get ( id = pk )
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
class DetailView ( MasterDetailCrud . DetailView ) :
def get_context_data ( self , * * kwargs ) :
context = super ( ) . get_context_data ( * * kwargs )
pk = context [ ' root_pk ' ]
sessao = SessaoPlenaria . objects . get ( id = pk )
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
class UpdateView ( MasterDetailCrud . UpdateView ) :
def get_context_data ( self , * * kwargs ) :
context = super ( ) . get_context_data ( * * kwargs )
pk = context [ ' root_pk ' ]
sessao = SessaoPlenaria . objects . get ( id = pk )
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
class OradorOrdemDiaCrud ( OradorCrud ) :
class OradorOrdemDiaCrud ( OradorCrud ) :
model = OradorOrdemDia
model = OradorOrdemDia
@ -676,7 +799,7 @@ class OradorOrdemDiaCrud(OradorCrud):
form_class = OradorOrdemDiaForm
form_class = OradorOrdemDiaForm
def get_initial ( self ) :
def get_initial ( self ) :
initial = super ( UpdateView , self ) . get_initial ( )
initial = super ( ) . get_initial ( )
initial . update ( { ' id_sessao ' : self . object . sessao_plenaria . id } )
initial . update ( { ' id_sessao ' : self . object . sessao_plenaria . id } )
initial . update ( { ' numero ' : self . object . numero_ordem } )
initial . update ( { ' numero ' : self . object . numero_ordem } )
@ -735,6 +858,16 @@ def sessao_legislativa_legislatura_ajax(request):
return JsonResponse ( { ' sessao_legislativa ' : lista_sessoes } )
return JsonResponse ( { ' sessao_legislativa ' : lista_sessoes } )
def recuperar_nome_tipo_sessao ( request ) :
try :
tipo = TipoSessaoPlenaria . objects . get ( pk = request . GET [ ' tipo ' ] )
tipo_nome = tipo . nome
except ObjectDoesNotExist :
tipo_nome = ' '
return JsonResponse ( { ' nome_tipo ' : tipo_nome } )
class SessaoCrud ( Crud ) :
class SessaoCrud ( Crud ) :
model = SessaoPlenaria
model = SessaoPlenaria
help_topic = ' sessao_legislativa '
help_topic = ' sessao_legislativa '
@ -764,6 +897,18 @@ class SessaoCrud(Crud):
form_class = SessaoPlenariaForm
form_class = SessaoPlenariaForm
@property
def layout_key ( self ) :
return ' SessaoSolene '
def get_context_data ( self , * * kwargs ) :
context = super ( ) . get_context_data ( * * kwargs )
sessao = context [ ' object ' ]
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
def get_initial ( self ) :
def get_initial ( self ) :
return { ' sessao_legislativa ' : self . object . sessao_legislativa }
return { ' sessao_legislativa ' : self . object . sessao_legislativa }
@ -772,6 +917,10 @@ class SessaoCrud(Crud):
form_class = SessaoPlenariaForm
form_class = SessaoPlenariaForm
logger = logging . getLogger ( __name__ )
logger = logging . getLogger ( __name__ )
@property
def layout_key ( self ) :
return ' SessaoSolene '
@property
@property
def cancel_url ( self ) :
def cancel_url ( self ) :
return self . search_url
return self . search_url
@ -804,6 +953,26 @@ class SessaoCrud(Crud):
namespace = self . model . _meta . app_config . name
namespace = self . model . _meta . app_config . name
return reverse ( ' %s : %s ' % ( namespace , ' sessaoplenaria_list ' ) )
return reverse ( ' %s : %s ' % ( namespace , ' sessaoplenaria_list ' ) )
class DetailView ( Crud . DetailView ) :
@property
def layout_key ( self ) :
sessao = self . object
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
return ' SessaoSolene '
return ' SessaoPlenaria '
def get_context_data ( self , * * kwargs ) :
context = super ( ) . get_context_data ( * * kwargs )
sessao = context [ ' object ' ]
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
# self.layout_key = 'SessaoSolene'
return context
class SessaoPermissionMixin ( PermissionRequiredForAppCrudMixin ,
class SessaoPermissionMixin ( PermissionRequiredForAppCrudMixin ,
FormMixin ,
FormMixin ,
@ -837,6 +1006,10 @@ class PresencaView(FormMixin, PresencaMixin, DetailView):
context = FormMixin . get_context_data ( self , * * kwargs )
context = FormMixin . get_context_data ( self , * * kwargs )
context [ ' title ' ] = ' %s <small>( %s )</small> ' % (
context [ ' title ' ] = ' %s <small>( %s )</small> ' % (
_ ( ' Presença ' ) , self . object )
_ ( ' Presença ' ) , self . object )
sessao = context [ ' object ' ]
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
return context
@method_decorator ( permission_required (
@method_decorator ( permission_required (
@ -921,17 +1094,23 @@ class PainelView(PermissionRequiredForAppCrudMixin, TemplateView):
cronometro_ordem = cronometro_ordem . seconds
cronometro_ordem = cronometro_ordem . seconds
cronometro_consideracoes = cronometro_consideracoes . seconds
cronometro_consideracoes = cronometro_consideracoes . seconds
sessao_pk = kwargs [ ' pk ' ]
sessao = SessaoPlenaria . objects . get ( pk = sessao_pk )
context = TemplateView . get_context_data ( self , * * kwargs )
context = TemplateView . get_context_data ( self , * * kwargs )
context . update ( {
context . update ( {
' head_title ' : str ( _ ( ' Painel Plenário ' ) ) ,
' head_title ' : str ( _ ( ' Painel Plenário ' ) ) ,
' sessao_id ' : kwargs [ ' pk ' ] ,
' sessao_id ' : sessao_pk ,
' root_pk ' : kwargs [ ' pk ' ] ,
' root_pk ' : sessao_pk ,
' sessaoplenaria ' : Se ssaoPl enaria . objects . get ( pk = kwargs [ ' pk ' ] ) ,
' sessaoplenaria ' : sessao ,
' cronometro_discurso ' : cronometro_discurso ,
' cronometro_discurso ' : cronometro_discurso ,
' cronometro_aparte ' : cronometro_aparte ,
' cronometro_aparte ' : cronometro_aparte ,
' cronometro_ordem ' : cronometro_ordem ,
' cronometro_ordem ' : cronometro_ordem ,
' cronometro_consideracoes ' : cronometro_consideracoes } )
' cronometro_consideracoes ' : cronometro_consideracoes } )
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
return context
@ -1154,6 +1333,10 @@ class MesaView(FormMixin, DetailView):
context = FormMixin . get_context_data ( self , * * kwargs )
context = FormMixin . get_context_data ( self , * * kwargs )
context [ ' title ' ] = ' %s <small>( %s )</small> ' % (
context [ ' title ' ] = ' %s <small>( %s )</small> ' % (
_ ( ' Mesa Diretora ' ) , self . object )
_ ( ' Mesa Diretora ' ) , self . object )
sessao = context [ ' object ' ]
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
return context
def get_success_url ( self ) :
def get_success_url ( self ) :
@ -1363,14 +1546,18 @@ def get_identificação_basica(sessao_plenaria):
abertura = data_inicio . strftime ( ' %d / % m/ % Y ' ) if data_inicio else ' '
abertura = data_inicio . strftime ( ' %d / % m/ % Y ' ) if data_inicio else ' '
data_fim = sessao_plenaria . data_fim
data_fim = sessao_plenaria . data_fim
encerramento = data_fim . strftime ( ' %d / % m/ % Y ' ) + ' - ' if data_fim else ' '
encerramento = data_fim . strftime ( ' %d / % m/ % Y ' ) + ' - ' if data_fim else ' '
return ( { ' basica ' : [
tema_solene = sessao_plenaria . tema_solene
context = { ' basica ' : [
_ ( ' Tipo de Sessão: %(tipo)s ' ) % { ' tipo ' : sessao_plenaria . tipo } ,
_ ( ' Tipo de Sessão: %(tipo)s ' ) % { ' tipo ' : sessao_plenaria . tipo } ,
_ ( ' Abertura: %(abertura)s - %(hora_inicio)s ' ) % {
_ ( ' Abertura: %(abertura)s - %(hora_inicio)s ' ) % {
' abertura ' : abertura , ' hora_inicio ' : sessao_plenaria . hora_inicio } ,
' abertura ' : abertura , ' hora_inicio ' : sessao_plenaria . hora_inicio } ,
_ ( ' Encerramento: %(encerramento)s %(hora_fim)s ' ) % {
_ ( ' Encerramento: %(encerramento)s %(hora_fim)s ' ) % {
' encerramento ' : encerramento , ' hora_fim ' : sessao_plenaria . hora_fim }
' encerramento ' : encerramento , ' hora_fim ' : sessao_plenaria . hora_fim } ,
] ,
] ,
' sessaoplenaria ' : sessao_plenaria } )
' sessaoplenaria ' : sessao_plenaria }
if sessao_plenaria . tipo . nome == " Solene " and tema_solene :
context . update ( { ' tema_solene ' : ' Tema da Sessão Solene: %s ' % tema_solene } )
return context
def get_conteudo_multimidia ( sessao_plenaria ) :
def get_conteudo_multimidia ( sessao_plenaria ) :
@ -1531,10 +1718,11 @@ def get_assinaturas(sessao_plenaria):
context . update (
context . update (
{ ' texto_assinatura ' : ' Assinatura da Mesa Diretora da Sessão ' } )
{ ' texto_assinatura ' : ' Assinatura da Mesa Diretora da Sessão ' } )
context . update ( { ' assinatura_mesa ' : mesa_dia } )
context . update ( { ' assinatura_mesa ' : mesa_dia } )
elif config_assinatura_ata == ' P ' and presidente_dia :
elif config_assinatura_ata == ' P ' and presidente_dia and presidente_dia [ 0 ] :
context . update (
context . update (
{ ' texto_assinatura ' : ' Assinatura do Presidente da Sessão ' } )
{ ' texto_assinatura ' : ' Assinatura do Presidente da Sessão ' } )
context . update ( { ' assinatura_mesa ' : presidente_dia } )
assinatura_presidente = [ { ' parlamentar ' : presidente_dia [ 0 ] , ' cargo ' : " Presidente " } ]
context . update ( { ' assinatura_mesa ' : assinatura_presidente } )
return context
return context
@ -1824,6 +2012,11 @@ class ResumoView(DetailView):
' decimo_terceiro_ordenacao ' : ' oradores_explicacoes.html ' ,
' decimo_terceiro_ordenacao ' : ' oradores_explicacoes.html ' ,
' decimo_quarto_ordenacao ' : ' ocorrencias_da_sessao.html '
' decimo_quarto_ordenacao ' : ' ocorrencias_da_sessao.html '
} )
} )
sessao = context [ ' object ' ]
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
return context
def get ( self , request , * args , * * kwargs ) :
def get ( self , request , * args , * * kwargs ) :
@ -1848,6 +2041,10 @@ class ExpedienteView(FormMixin, DetailView):
context = FormMixin . get_context_data ( self , * * kwargs )
context = FormMixin . get_context_data ( self , * * kwargs )
context [ ' title ' ] = ' %s <small>( %s )</small> ' % (
context [ ' title ' ] = ' %s <small>( %s )</small> ' % (
_ ( ' Expediente Diversos ' ) , self . object )
_ ( ' Expediente Diversos ' ) , self . object )
sessao = context [ ' object ' ]
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
return context
@method_decorator ( permission_required ( ' sessao.add_expedientesessao ' ) )
@method_decorator ( permission_required ( ' sessao.add_expedientesessao ' ) )
@ -1937,6 +2134,10 @@ class OcorrenciaSessaoView(FormMixin, DetailView):
context = FormMixin . get_context_data ( self , * * kwargs )
context = FormMixin . get_context_data ( self , * * kwargs )
context [ ' title ' ] = ' Ocorrências da Sessão <small>( %s )</small> ' % (
context [ ' title ' ] = ' Ocorrências da Sessão <small>( %s )</small> ' % (
self . object )
self . object )
sessao = context [ ' object ' ]
tipo_sessao = sessao . tipo
if tipo_sessao . nome == " Solene " :
context . update ( { ' subnav_template_name ' : ' sessao/subnav-solene.yaml ' } )
return context
return context
def delete ( self ) :
def delete ( self ) :
@ -2662,8 +2863,7 @@ class VotacaoNominalTransparenciaDetailView(TemplateView):
template_name = ' sessao/votacao/nominal_transparencia.html '
template_name = ' sessao/votacao/nominal_transparencia.html '
def get_context_data ( self , * * kwargs ) :
def get_context_data ( self , * * kwargs ) :
context = super ( VotacaoNominalTransparenciaDetailView ,
context = super ( ) . get_context_data ( * * kwargs )
self ) . get_context_data ( * * kwargs )
materia_votacao = self . request . GET . get ( ' materia ' , None )
materia_votacao = self . request . GET . get ( ' materia ' , None )
@ -2747,8 +2947,7 @@ class VotacaoSimbolicaTransparenciaDetailView(TemplateView):
template_name = ' sessao/votacao/simbolica_transparencia.html '
template_name = ' sessao/votacao/simbolica_transparencia.html '
def get_context_data ( self , * * kwargs ) :
def get_context_data ( self , * * kwargs ) :
context = super ( VotacaoSimbolicaTransparenciaDetailView ,
context = super ( ) . get_context_data ( * * kwargs )
self ) . get_context_data ( * * kwargs )
materia_votacao = self . request . GET . get ( ' materia ' , None )
materia_votacao = self . request . GET . get ( ' materia ' , None )
@ -3015,7 +3214,7 @@ class SessaoListView(ListView):
return SessaoPlenaria . objects . all ( ) . order_by ( ' -data_inicio ' )
return SessaoPlenaria . objects . all ( ) . order_by ( ' -data_inicio ' )
def get_context_data ( self , * * kwargs ) :
def get_context_data ( self , * * kwargs ) :
context = super ( SessaoListView , self ) . get_context_data ( * * kwargs )
context = super ( ) . get_context_data ( * * kwargs )
paginator = context [ ' paginator ' ]
paginator = context [ ' paginator ' ]
page_obj = context [ ' page_obj ' ]
page_obj = context [ ' page_obj ' ]
@ -3179,8 +3378,7 @@ class PesquisarSessaoPlenariaView(FilterView):
logger = logging . getLogger ( __name__ )
logger = logging . getLogger ( __name__ )
def get_filterset_kwargs ( self , filterset_class ) :
def get_filterset_kwargs ( self , filterset_class ) :
super ( PesquisarSessaoPlenariaView ,
super ( ) . get_filterset_kwargs ( filterset_class )
self ) . get_filterset_kwargs ( filterset_class )
kwargs = { ' data ' : self . request . GET or None }
kwargs = { ' data ' : self . request . GET or None }
@ -3196,8 +3394,7 @@ class PesquisarSessaoPlenariaView(FilterView):
return kwargs
return kwargs
def get_context_data ( self , * * kwargs ) :
def get_context_data ( self , * * kwargs ) :
context = super ( PesquisarSessaoPlenariaView ,
context = super ( ) . get_context_data ( * * kwargs )
self ) . get_context_data ( * * kwargs )
context [ ' title ' ] = _ ( ' Pesquisar Sessão Plenária ' )
context [ ' title ' ] = _ ( ' Pesquisar Sessão Plenária ' )
paginator = context [ ' paginator ' ]
paginator = context [ ' paginator ' ]
@ -3209,7 +3406,7 @@ class PesquisarSessaoPlenariaView(FilterView):
return context
return context
def get ( self , request , * args , * * kwargs ) :
def get ( self , request , * args , * * kwargs ) :
super ( PesquisarSessaoPlenariaView , self ) . get ( request )
super ( ) . get ( request )
# Se a pesquisa estiver quebrando com a paginação
# Se a pesquisa estiver quebrando com a paginação
# Olhe esta função abaixo
# Olhe esta função abaixo
@ -3247,8 +3444,7 @@ class PesquisarPautaSessaoView(PesquisarSessaoPlenariaView):
logger . debug ( ' Pesquisa de PautaSessao. ' )
logger . debug ( ' Pesquisa de PautaSessao. ' )
def get_context_data ( self , * * kwargs ) :
def get_context_data ( self , * * kwargs ) :
context = super ( PesquisarPautaSessaoView ,
context = super ( ) . get_context_data ( * * kwargs )
self ) . get_context_data ( * * kwargs )
context [ ' title ' ] = _ ( ' Pesquisar Pauta de Sessão ' )
context [ ' title ' ] = _ ( ' Pesquisar Pauta de Sessão ' )
return context
return context
@ -3269,8 +3465,7 @@ class AdicionarVariasMateriasExpediente(PermissionRequiredForAppCrudMixin,
logger = logging . getLogger ( __name__ )
logger = logging . getLogger ( __name__ )
def get_filterset_kwargs ( self , filterset_class ) :
def get_filterset_kwargs ( self , filterset_class ) :
super ( AdicionarVariasMateriasExpediente ,
super ( ) . get_filterset_kwargs ( filterset_class )
self ) . get_filterset_kwargs ( filterset_class )
kwargs = { ' data ' : self . request . GET or None }
kwargs = { ' data ' : self . request . GET or None }
@ -3294,8 +3489,7 @@ class AdicionarVariasMateriasExpediente(PermissionRequiredForAppCrudMixin,
return kwargs
return kwargs
def get_context_data ( self , * * kwargs ) :
def get_context_data ( self , * * kwargs ) :
context = super ( MateriaLegislativaPesquisaView ,
context = super ( ) . get_context_data ( * * kwargs )
self ) . get_context_data ( * * kwargs )
context [ ' title ' ] = _ ( ' Pesquisar Matéria Legislativa ' )
context [ ' title ' ] = _ ( ' Pesquisar Matéria Legislativa ' )
context [ ' root_pk ' ] = self . kwargs [ ' pk ' ]
context [ ' root_pk ' ] = self . kwargs [ ' pk ' ]
@ -3362,8 +3556,7 @@ class AdicionarVariasMateriasOrdemDia(AdicionarVariasMateriasExpediente):
logger = logging . getLogger ( __name__ )
logger = logging . getLogger ( __name__ )
def get_filterset_kwargs ( self , filterset_class ) :
def get_filterset_kwargs ( self , filterset_class ) :
super ( AdicionarVariasMateriasExpediente ,
super ( ) . get_filterset_kwargs ( filterset_class )
self ) . get_filterset_kwargs ( filterset_class )
kwargs = { ' data ' : self . request . GET or None }
kwargs = { ' data ' : self . request . GET or None }
@ -3581,8 +3774,7 @@ class VotacaoEmBlocoExpediente(PermissionRequiredForAppCrudMixin, ListView):
retiradapauta = None )
retiradapauta = None )
def get_context_data ( self , * * kwargs ) :
def get_context_data ( self , * * kwargs ) :
context = super ( VotacaoEmBlocoExpediente ,
context = super ( ) . get_context_data ( * * kwargs )
self ) . get_context_data ( * * kwargs )
context [ ' pk ' ] = self . kwargs [ ' pk ' ]
context [ ' pk ' ] = self . kwargs [ ' pk ' ]
context [ ' root_pk ' ] = self . kwargs [ ' pk ' ]
context [ ' root_pk ' ] = self . kwargs [ ' pk ' ]
if not verifica_sessao_iniciada ( self . request , self . kwargs [ ' pk ' ] ) :
if not verifica_sessao_iniciada ( self . request , self . kwargs [ ' pk ' ] ) :