@ -59,13 +59,13 @@ TramitacaoCrud = Crud.build(Tramitacao, '')
class FormularioSimplificadoView ( CreateView ) :
class FormularioSimplificadoView ( CreateView ) :
template_name = " materia/formulario_simplificado.html "
template_name = " materia/formulario_simplificado.html "
form_class = FormularioSimplificadoForm
form_class = FormularioSimplificadoForm
success_url = reverse_lazy ( ' materialegislativa: list ' )
success_url = reverse_lazy ( ' materia:materialegislativa_ list ' )
class FormularioCadastroView ( CreateView ) :
class FormularioCadastroView ( CreateView ) :
template_name = " materia/formulario_cadastro.html "
template_name = " materia/formulario_cadastro.html "
form_class = FormularioCadastroForm
form_class = FormularioCadastroForm
success_url = reverse_lazy ( ' formulario_cadastro ' )
success_url = reverse_lazy ( ' materia: formulario_cadastro' )
class MateriaAnexadaView ( FormView ) :
class MateriaAnexadaView ( FormView ) :
@ -141,7 +141,7 @@ class MateriaAnexadaView(FormView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' materia_anexada ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia:materia _anexada ' , kwargs = { ' pk ' : pk } )
class MateriaAnexadaEditView ( FormView ) :
class MateriaAnexadaEditView ( FormView ) :
@ -220,11 +220,11 @@ class MateriaAnexadaEditView(FormView):
else :
else :
return self . render_to_response (
return self . render_to_response (
{ ' form ' : form ,
{ ' form ' : form ,
' materialegislativa ' : mat_principal } )
' materia ' : mat_principal } )
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' materia_anexada ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia:materia _anexada ' , kwargs = { ' pk ' : pk } )
class DespachoInicialView ( CreateView ) :
class DespachoInicialView ( CreateView ) :
@ -259,7 +259,7 @@ class DespachoInicialView(CreateView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' despacho_inicial ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: despacho_inicial' , kwargs = { ' pk ' : pk } )
class DespachoInicialEditView ( CreateView ) :
class DespachoInicialEditView ( CreateView ) :
@ -295,7 +295,7 @@ class DespachoInicialEditView(CreateView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' despacho_inicial ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: despacho_inicial' , kwargs = { ' pk ' : pk } )
class LegislacaoCitadaView ( FormView ) :
class LegislacaoCitadaView ( FormView ) :
@ -356,7 +356,7 @@ class LegislacaoCitadaView(FormView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' legislacao_citada ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: legislacao_citada' , kwargs = { ' pk ' : pk } )
class LegislacaoCitadaEditView ( FormView ) :
class LegislacaoCitadaEditView ( FormView ) :
@ -365,7 +365,7 @@ class LegislacaoCitadaEditView(FormView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' legislacao_citada ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: legislacao_citada' , kwargs = { ' pk ' : pk } )
def get ( self , request , * args , * * kwargs ) :
def get ( self , request , * args , * * kwargs ) :
materia = MateriaLegislativa . objects . get ( id = kwargs [ ' pk ' ] )
materia = MateriaLegislativa . objects . get ( id = kwargs [ ' pk ' ] )
@ -455,7 +455,7 @@ class NumeracaoView(CreateView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' numeracao ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: numeracao' , kwargs = { ' pk ' : pk } )
class NumeracaoEditView ( CreateView ) :
class NumeracaoEditView ( CreateView ) :
@ -495,7 +495,7 @@ class NumeracaoEditView(CreateView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' numeracao ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: numeracao' , kwargs = { ' pk ' : pk } )
class DocumentoAcessorioView ( CreateView ) :
class DocumentoAcessorioView ( CreateView ) :
@ -531,13 +531,13 @@ class DocumentoAcessorioView(CreateView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' documento_acessorio ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: documento_acessorio' , kwargs = { ' pk ' : pk } )
class AcompanhamentoConfirmarView ( TemplateView ) :
class AcompanhamentoConfirmarView ( TemplateView ) :
def get_redirect_url ( self ) :
def get_redirect_url ( self ) :
return reverse ( " sessaoplenaria :list_pauta_sessao " )
return reverse ( " sessao:list_pauta_sessao " )
def get ( self , request , * args , * * kwargs ) :
def get ( self , request , * args , * * kwargs ) :
materia_id = kwargs [ ' pk ' ]
materia_id = kwargs [ ' pk ' ]
@ -554,7 +554,7 @@ class AcompanhamentoConfirmarView(TemplateView):
class AcompanhamentoExcluirView ( TemplateView ) :
class AcompanhamentoExcluirView ( TemplateView ) :
def get_redirect_url ( self ) :
def get_redirect_url ( self ) :
return reverse ( " sessaoplenaria :list_pauta_sessao " )
return reverse ( " sessao:list_pauta_sessao " )
def get ( self , request , * args , * * kwargs ) :
def get ( self , request , * args , * * kwargs ) :
materia_id = kwargs [ ' pk ' ]
materia_id = kwargs [ ' pk ' ]
@ -602,7 +602,7 @@ class DocumentoAcessorioEditView(CreateView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' documento_acessorio ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: documento_acessorio' , kwargs = { ' pk ' : pk } )
class RelatoriaEditView ( FormView ) :
class RelatoriaEditView ( FormView ) :
@ -611,7 +611,7 @@ class RelatoriaEditView(FormView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' relatoria ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: relatoria' , kwargs = { ' pk ' : pk } )
def get ( self , request , * args , * * kwargs ) :
def get ( self , request , * args , * * kwargs ) :
form = RelatoriaForm ( )
form = RelatoriaForm ( )
@ -668,7 +668,7 @@ class RelatoriaView(FormView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' relatoria ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: relatoria' , kwargs = { ' pk ' : pk } )
def post ( self , request , * args , * * kwargs ) :
def post ( self , request , * args , * * kwargs ) :
form = RelatoriaForm ( request . POST )
form = RelatoriaForm ( request . POST )
@ -808,8 +808,9 @@ def criar_email_confirmacao(request, casa_legislativa, materia, hash_txt=''):
casa_legislativa . uf )
casa_legislativa . uf )
base_url = get_base_url ( request )
base_url = get_base_url ( request )
materia_url = reverse ( ' acompanhar_materia ' , kwargs = { ' pk ' : materia . id } )
materia_url = reverse ( ' materia:acompanhar_materia ' ,
confirmacao_url = reverse ( ' acompanhar_confirmar ' ,
kwargs = { ' pk ' : materia . id } )
confirmacao_url = reverse ( ' materia:acompanhar_confirmar ' ,
kwargs = { ' pk ' : materia . id } )
kwargs = { ' pk ' : materia . id } )
autores = [ ]
autores = [ ]
@ -844,8 +845,10 @@ def criar_email_tramitacao(request, casa_legislativa, materia, hash_txt=''):
casa_legislativa . uf )
casa_legislativa . uf )
base_url = get_base_url ( request )
base_url = get_base_url ( request )
url_materia = reverse ( ' acompanhar_materia ' , kwargs = { ' pk ' : materia . id } )
url_materia = reverse ( ' materia:acompanhar_materia ' ,
url_excluir = reverse ( ' acompanhar_excluir ' , kwargs = { ' pk ' : materia . id } )
kwargs = { ' pk ' : materia . id } )
url_excluir = reverse ( ' materia:acompanhar_excluir ' ,
kwargs = { ' pk ' : materia . id } )
autores = [ ]
autores = [ ]
for autoria in materia . autoria_set . all ( ) :
for autoria in materia . autoria_set . all ( ) :
@ -1028,7 +1031,7 @@ class TramitacaoView(CreateView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' tramitacao_materia ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: tramitacao_materia' , kwargs = { ' pk ' : pk } )
class TramitacaoEditView ( CreateView ) :
class TramitacaoEditView ( CreateView ) :
@ -1083,7 +1086,7 @@ class TramitacaoEditView(CreateView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' tramitacao_materia ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: tramitacao_materia' , kwargs = { ' pk ' : pk } )
class AutoriaView ( CreateView ) :
class AutoriaView ( CreateView ) :
@ -1125,7 +1128,7 @@ class AutoriaView(CreateView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' autoria ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: autoria' , kwargs = { ' pk ' : pk } )
class AutoriaEditView ( CreateView ) :
class AutoriaEditView ( CreateView ) :
@ -1164,7 +1167,7 @@ class AutoriaEditView(CreateView):
def get_success_url ( self ) :
def get_success_url ( self ) :
pk = self . kwargs [ ' pk ' ]
pk = self . kwargs [ ' pk ' ]
return reverse ( ' autoria ' , kwargs = { ' pk ' : pk } )
return reverse ( ' materia: autoria' , kwargs = { ' pk ' : pk } )
class ProposicaoListView ( ListView ) :
class ProposicaoListView ( ListView ) :
@ -1192,7 +1195,7 @@ class MateriaLegislativaPesquisaView(FormView):
template_name = ' materia/pesquisa_materia.html '
template_name = ' materia/pesquisa_materia.html '
def get_success_url ( self ) :
def get_success_url ( self ) :
return reverse ( ' pesquisar_materia ' )
return reverse ( ' materia: pesquisar_materia' )
def get ( self , request , * args , * * kwargs ) :
def get ( self , request , * args , * * kwargs ) :
form = MateriaLegislativaPesquisaForm ( )
form = MateriaLegislativaPesquisaForm ( )
@ -1240,7 +1243,8 @@ class MateriaLegislativaPesquisaView(FormView):
kwargs [ ' situacao ' ] = form . data [ ' situacao ' ]
kwargs [ ' situacao ' ] = form . data [ ' situacao ' ]
request . session [ ' kwargs ' ] = kwargs
request . session [ ' kwargs ' ] = kwargs
return redirect ( ' pesquisar_materia_list ' )
return redirect ( ' materia:pesquisar_materia_list ' )
class PesquisaMateriaListView ( ListView ) :
class PesquisaMateriaListView ( ListView ) :
@ -1306,7 +1310,7 @@ class ProposicaoView(CreateView):
form_class = ProposicaoForm
form_class = ProposicaoForm
def get_success_url ( self ) :
def get_success_url ( self ) :
return reverse ( ' list_proposicao ' )
return reverse ( ' materia: list_proposicao' )
def get ( self , request , * args , * * kwargs ) :
def get ( self , request , * args , * * kwargs ) :
return self . render_to_response ( { ' form ' : self . get_form ( ) } )
return self . render_to_response ( { ' form ' : self . get_form ( ) } )
@ -1341,7 +1345,7 @@ class ProposicaoEditView(CreateView):
form_class = ProposicaoForm
form_class = ProposicaoForm
def get_success_url ( self ) :
def get_success_url ( self ) :
return reverse ( ' list_proposicao ' )
return reverse ( ' materia: list_proposicao' )
def get ( self , request , * args , * * kwargs ) :
def get ( self , request , * args , * * kwargs ) :
proposicao = Proposicao . objects . get ( id = kwargs [ ' pk ' ] )
proposicao = Proposicao . objects . get ( id = kwargs [ ' pk ' ] )
@ -1459,4 +1463,4 @@ class AcompanhamentoMateriaView(MateriaLegislativaCrud.CrudDetailView):
' materia ' : materia } )
' materia ' : materia } )
def get_success_url ( self ) :
def get_success_url ( self ) :
return reverse ( ' sessaoplenaria :list_pauta_sessao ' )
return reverse ( ' sessao:list_pauta_sessao ' )