From 03ae8a6d085bf42af2082f8e9fe1ecdd1decf292 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Thu, 18 Sep 2014 16:43:19 -0300 Subject: [PATCH] Codigo refatorado para seguir a pep8 (arquivos urls.py) autopep8 -r --in-place --ignore E501,E128 . e alguns ajustes para seguir a formatacao usual do patterns em urls.py --- sigi/apps/casas/urls.py | 12 ++++++------ sigi/apps/convenios/urls.py | 14 +++++++------- sigi/apps/diagnosticos/urls.py | 6 +++--- sigi/apps/financeiro/urls.py | 2 +- sigi/apps/metas/urls.py | 14 +++++++------- sigi/apps/parlamentares/urls.py | 14 +++++++------- sigi/apps/servicos/urls.py | 10 +++++----- sigi/apps/servidores/urls.py | 2 +- sigi/urls.py | 2 +- 9 files changed, 38 insertions(+), 38 deletions(-) diff --git a/sigi/apps/casas/urls.py b/sigi/apps/casas/urls.py index 21535b8..f258868 100644 --- a/sigi/apps/casas/urls.py +++ b/sigi/apps/casas/urls.py @@ -7,9 +7,9 @@ urlpatterns = patterns('sigi.apps.casas.views', # Informacoes de uma casa legislativa url(r'^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'^labels/$', 'labels_report', name='labels-report-all'), url(r'^(?P\w+)/labels/$', 'labels_report', name='labels-report-id'), # Reports Labels Parlamentar @@ -26,11 +26,11 @@ urlpatterns = patterns('sigi.apps.casas.views', url(r'^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'^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'^carrinho/excluir_carrinho/$', 'excluir_carrinho', name='excluir-carrinho'), # Error + url(r'^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 3c692e8..f5805cf 100644 --- a/sigi/apps/convenios/urls.py +++ b/sigi/apps/convenios/urls.py @@ -3,10 +3,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'), -) \ No newline at end of file + 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'), +) diff --git a/sigi/apps/diagnosticos/urls.py b/sigi/apps/diagnosticos/urls.py index 881ca50..b4a035b 100644 --- a/sigi/apps/diagnosticos/urls.py +++ b/sigi/apps/diagnosticos/urls.py @@ -32,8 +32,8 @@ urlpatterns = patterns('sigi.apps.diagnosticos.views', url(r'^diagnostico/(?P\w+).pdf$', 'diagnostico_pdf', name='diagnostico-pdf'), # Graficos de perguntas - url(r'^graficos/$', 'graficos', name="diagnosticos-graficos"), #tagerror - url(r'^api/$', 'grafico_api', name="diagnosticos-grafico-api"), #tagerror + url(r'^graficos/$', 'graficos', name="diagnosticos-graficos"), # tagerror + url(r'^api/$', 'grafico_api', name="diagnosticos-grafico-api"), # tagerror ) @@ -44,5 +44,5 @@ urlpatterns += patterns('django.contrib.auth.views', # Logout do Diagnóstico url(r'^mobile/logout/$', 'logout', - {'next_page': LOGIN_REDIRECT_URL}, name='logout'), + {'next_page': LOGIN_REDIRECT_URL}, name='logout'), ) diff --git a/sigi/apps/financeiro/urls.py b/sigi/apps/financeiro/urls.py index 5d79a9f..681fc88 100644 --- a/sigi/apps/financeiro/urls.py +++ b/sigi/apps/financeiro/urls.py @@ -1,3 +1,3 @@ from django.conf.urls.defaults import * -# place app url patterns here \ No newline at end of file +# place app url patterns here diff --git a/sigi/apps/metas/urls.py b/sigi/apps/metas/urls.py index e6a3107..4e3b2be 100644 --- a/sigi/apps/metas/urls.py +++ b/sigi/apps/metas/urls.py @@ -3,10 +3,10 @@ from django.conf.urls import patterns, url urlpatterns = patterns('sigi.apps.metas.views', - url(r'^$', 'dashboard', name='metas-dashboardsss'), #tagerror - url(r'^mapa/$', 'mapa', name='metas-mapa'), #tagerror - url(r'^mapdata/$', 'map_data', name='metas-map_data'), - url(r'^mapsearch/$', 'map_search', name='metas-map_search'), - url(r'^mapsum/$', 'map_sum', name='metas-map_sum'), - url(r'^maplist/$', 'map_list', name='metas-map_list'), -) \ No newline at end of file + url(r'^$', 'dashboard', name='metas-dashboardsss'), # tagerror + url(r'^mapa/$', 'mapa', name='metas-mapa'), # tagerror + url(r'^mapdata/$', 'map_data', name='metas-map_data'), + url(r'^mapsearch/$', 'map_search', name='metas-map_search'), + url(r'^mapsum/$', 'map_sum', name='metas-map_sum'), + url(r'^maplist/$', 'map_list', name='metas-map_list'), +) diff --git a/sigi/apps/parlamentares/urls.py b/sigi/apps/parlamentares/urls.py index ce518fc..7ac7430 100644 --- a/sigi/apps/parlamentares/urls.py +++ b/sigi/apps/parlamentares/urls.py @@ -3,14 +3,14 @@ from django.conf.urls import patterns, url 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'), + # Reports labels parlamentares + url(r'^labels/$', 'labels_report', name='labels-report-all'), + url(r'^(?P\w+)/labels/$', 'labels_report', name='labels-report-id'), - # Carrinho - url(r'^carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'), + # Carrinho + url(r'^carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'), url(r'^carrinho/deleta_itens_carrinho$', 'deleta_itens_carrinho', name='deleta-itens-carrinho'), - # A view excluir_carrinho n existe ainda. + # A view excluir_carrinho n existe ainda. # url(r'^carrinho/exluir_carrinho$', 'excluir_carrinho', name='excluir-carrinho'), -) \ No newline at end of file +) diff --git a/sigi/apps/servicos/urls.py b/sigi/apps/servicos/urls.py index 2951d11..6ff5037 100644 --- a/sigi/apps/servicos/urls.py +++ b/sigi/apps/servicos/urls.py @@ -6,8 +6,8 @@ from .views import MapaView urlpatterns = patterns('sigi.apps.servicos.views', - url(r'^manifesta/$', 'casa_manifesta_view', name="casa-manifesta-view"), - url(r'^munatenjson/(?P\w+)/$', 'municipios_atendidos', name="municipios-atendidos"), - url(r'^mapa/(?P\w+)/$', MapaView.as_view(), name="servicos-mapa"), - # url(r'^listacasas/(?P\w+)', 'casas_usam_servico', name="casas-usam-servico"), -) \ No newline at end of file + url(r'^manifesta/$', 'casa_manifesta_view', name="casa-manifesta-view"), + url(r'^munatenjson/(?P\w+)/$', 'municipios_atendidos', name="municipios-atendidos"), + url(r'^mapa/(?P\w+)/$', MapaView.as_view(), name="servicos-mapa"), + # url(r'^listacasas/(?P\w+)', 'casas_usam_servico', name="casas-usam-servico"), +) diff --git a/sigi/apps/servidores/urls.py b/sigi/apps/servidores/urls.py index 1ea1a56..4ba2f22 100644 --- a/sigi/apps/servidores/urls.py +++ b/sigi/apps/servidores/urls.py @@ -6,4 +6,4 @@ urlpatterns = patterns('sigi.apps.servidores.views', # Reports servidores url(r'^servidores_por_funcao.pdf$', 'servidores_por_funcao', name='servidores-funcao-pdf'), url(r'^servidores_por_cargo.pdf$', 'servidores_por_cargo', name='servidores-cargo-pdf'), -) \ No newline at end of file +) diff --git a/sigi/urls.py b/sigi/urls.py index 8789108..69cfbb9 100644 --- a/sigi/urls.py +++ b/sigi/urls.py @@ -17,7 +17,7 @@ urlpatterns = patterns('', url(r'^servidores/', include('sigi.apps.servidores.urls')), url(r'^servicos/', include('sigi.apps.servicos.urls')), url(r'^dashboard/', include('sigi.apps.metas.urls')), - + url(r'^', include(admin.site.urls)), ) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)