From bf915679d2c0feff0c276dd2f0597a9d9d450094 Mon Sep 17 00:00:00 2001 From: Sesostris Vieira Date: Wed, 21 Oct 2015 21:04:41 -0200 Subject: [PATCH] Adjust urls from some apps for more flexible mapping --- sigi/apps/casas/urls.py | 20 ++++++++++---------- sigi/apps/convenios/urls.py | 12 ++++++------ sigi/apps/parlamentares/urls.py | 10 +++++----- sigi/urls.py | 6 +++--- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/sigi/apps/casas/urls.py b/sigi/apps/casas/urls.py index 25d0661..4a4a609 100644 --- a/sigi/apps/casas/urls.py +++ b/sigi/apps/casas/urls.py @@ -6,32 +6,32 @@ urlpatterns = patterns( 'sigi.apps.casas.views', # Informacoes de uma casa legislativa - url(r'^report_complete/$', 'report_complete', name='report-complete-all'), + url(r'^casalegislativa/report_complete/$', 'report_complete', name='report-complete-all'), url(r'^(?P\w+)/report_complete/$', 'report_complete', name='report-complete-id'), # Reports Labels - url(r'^labels/$', 'labels_report', name='labels-report-all'), + url(r'^casalegislativa/labels/$', 'labels_report', name='labels-report-all'), url(r'^(?P\w+)/labels/$', 'labels_report', name='labels-report-id'), # Reports Labels Parlamentar - url(r'^labels_parlamentar/$', 'labels_report_parlamentar', name='lebels-report-parlamentar-all'), + url(r'^casalegislativa/labels_parlamentar/$', 'labels_report_parlamentar', name='lebels-report-parlamentar-all'), url(r'^(?P\w+)/labels_parlamentar/$', 'labels_report_parlamentar', name='labels-report-parlamentar-id'), # Reports labels sem presidente - url(r'^labels_sem_presidente/$', 'labels_report_sem_presidente', name='labels-report-sem-presidente-all'), + url(r'^casalegislativa/labels_sem_presidente/$', 'labels_report_sem_presidente', name='labels-report-sem-presidente-all'), url(r'^(?P\w+)/labels_sem_presidente/$', 'labels_report_sem_presidente', name='labels-report-sem-presidente-id'), # Reports casas sem convenio - url(r'^reports/$', 'report', name='casa-report'), - url(r'^casas_sem_convenio_report/$', 'casas_sem_convenio_report', name='casas-sem-convenio-report'), + url(r'^casalegislativa/reports/$', 'report', name='casa-report'), + url(r'^casalegislativa/casas_sem_convenio_report/$', 'casas_sem_convenio_report', name='casas-sem-convenio-report'), # CSV - url(r'^csv/$', 'export_csv', name='casa-export-csv'), # Error + url(r'^casalegislativa/csv/$', 'export_csv', name='casa-export-csv'), # Error # Carrinho - url(r'^carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'), - url(r'^carrinho/excluir_carrinho/$', 'excluir_carrinho', name='excluir-carrinho'), # Error - url(r'^carrinho/deleta_itens_carrinho$', 'deleta_itens_carrinho', name='deleta-itens-carrinho'), # Error + url(r'^casalegislativa/carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'), + url(r'^casalegislativa/carrinho/excluir_carrinho/$', 'excluir_carrinho', name='excluir-carrinho'), # Error + url(r'^casalegislativa/carrinho/deleta_itens_carrinho$', 'deleta_itens_carrinho', name='deleta-itens-carrinho'), # Error ) diff --git a/sigi/apps/convenios/urls.py b/sigi/apps/convenios/urls.py index 0bf98dc..26cd8f6 100644 --- a/sigi/apps/convenios/urls.py +++ b/sigi/apps/convenios/urls.py @@ -5,10 +5,10 @@ from django.conf.urls import patterns, url urlpatterns = patterns( 'sigi.apps.convenios.views', - url(r'^reports/$', 'report', name='convenios-report'), - url(r'^carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'), - url(r'^carrinho/excluir_carrinho/$', 'excluir_carrinho', name='excluir-carrinho'), # tagerror - url(r'^carrinho/deleta_itens_carrinho$', 'deleta_itens_carrinho', name='deleta-itens-carrinho'), # tagerror - url(r'^csv/$', 'export_csv', name='convenios-csv'), - url(r'^reportsRegiao/(?P\w+)/$', 'report_regiao', name='convenios-report_regiao_pdf'), + url(r'^convenio/reports/$', 'report', name='convenios-report'), + url(r'^convenio/carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'), + url(r'^convenio/carrinho/excluir_carrinho/$', 'excluir_carrinho', name='excluir-carrinho'), # tagerror + url(r'^convenio/carrinho/deleta_itens_carrinho$', 'deleta_itens_carrinho', name='deleta-itens-carrinho'), # tagerror + url(r'^convenio/csv/$', 'export_csv', name='convenios-csv'), + url(r'^convenio/reportsRegiao/(?P\w+)/$', 'report_regiao', name='convenios-report_regiao_pdf'), ) diff --git a/sigi/apps/parlamentares/urls.py b/sigi/apps/parlamentares/urls.py index 99228ac..395ef31 100644 --- a/sigi/apps/parlamentares/urls.py +++ b/sigi/apps/parlamentares/urls.py @@ -5,13 +5,13 @@ urlpatterns = patterns( 'sigi.apps.parlamentares.views', # Reports labels parlamentares - url(r'^labels/$', 'labels_report', name='labels-report-all'), - url(r'^(?P\w+)/labels/$', 'labels_report', name='labels-report-id'), + url(r'^parlamentar/labels/$', 'labels_report', name='labels-report-all'), + url(r'^parlamentar/(?P\w+)/labels/$', 'labels_report', name='labels-report-id'), # Carrinho - url(r'^carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'), - url(r'^carrinho/deleta_itens_carrinho$', 'deleta_itens_carrinho', name='deleta-itens-carrinho'), + url(r'^parlamentar/carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'), + url(r'^parlamentar/carrinho/deleta_itens_carrinho$', 'deleta_itens_carrinho', name='deleta-itens-carrinho'), # A view excluir_carrinho n existe ainda. - # url(r'^carrinho/exluir_carrinho$', 'excluir_carrinho', name='excluir-carrinho'), + # url(r'^parlamentar/carrinho/exluir_carrinho$', 'excluir_carrinho', name='excluir-carrinho'), ) diff --git a/sigi/urls.py b/sigi/urls.py index 594acd7..4ca1707 100644 --- a/sigi/urls.py +++ b/sigi/urls.py @@ -14,9 +14,9 @@ admin.autodiscover() urlpatterns = patterns( '', - url(r'^parlamentares/parlamentar/', include('sigi.apps.parlamentares.urls')), - url(r'^casas/casalegislativa/', include('sigi.apps.casas.urls')), - url(r'^convenios/convenio/', include('sigi.apps.convenios.urls')), + url(r'^parlamentares/', include('sigi.apps.parlamentares.urls')), + url(r'^casas/', include('sigi.apps.casas.urls')), + url(r'^convenios/', include('sigi.apps.convenios.urls')), url(r'^diagnosticos/', include('sigi.apps.diagnosticos.urls')), url(r'^servidores/', include('sigi.apps.servidores.urls')), url(r'^servicos/', include('sigi.apps.servicos.urls')),