Browse Source

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
producao
Marcio Mazza 10 years ago
parent
commit
03ae8a6d08
  1. 8
      sigi/apps/casas/urls.py
  2. 12
      sigi/apps/convenios/urls.py
  3. 6
      sigi/apps/diagnosticos/urls.py
  4. 12
      sigi/apps/metas/urls.py
  5. 12
      sigi/apps/parlamentares/urls.py
  6. 8
      sigi/apps/servicos/urls.py

8
sigi/apps/casas/urls.py

@ -9,7 +9,7 @@ urlpatterns = patterns('sigi.apps.casas.views',
url(r'^(?P<id>\w+)/report_complete/$', 'report_complete', name='report-complete-id'), url(r'^(?P<id>\w+)/report_complete/$', 'report_complete', name='report-complete-id'),
# Reports Labels # Reports Labels
url(r'^labels/$','labels_report', name='labels-report-all'), url(r'^labels/$', 'labels_report', name='labels-report-all'),
url(r'^(?P<id>\w+)/labels/$', 'labels_report', name='labels-report-id'), url(r'^(?P<id>\w+)/labels/$', 'labels_report', name='labels-report-id'),
# Reports Labels Parlamentar # 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'), url(r'^casas_sem_convenio_report/$', 'casas_sem_convenio_report', name='casas-sem-convenio-report'),
# CSV # CSV
url(r'^csv/$', 'export_csv', name='casa-export-csv'), # Error url(r'^csv/$', 'export_csv', name='casa-export-csv'), # Error
# Carrinho # Carrinho
url(r'^carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'), url(r'^carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'),
url(r'^carrinho/excluir_carrinho/$', 'excluir_carrinho', name='excluir-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 url(r'^carrinho/deleta_itens_carrinho$', 'deleta_itens_carrinho', name='deleta-itens-carrinho'), # Error
) )

12
sigi/apps/convenios/urls.py

@ -3,10 +3,10 @@ from django.conf.urls import patterns, url
urlpatterns = patterns('sigi.apps.convenios.views', urlpatterns = patterns('sigi.apps.convenios.views',
url(r'^reports/$', 'report', name='convenios-report'), url(r'^reports/$', 'report', name='convenios-report'),
url(r'^carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'), url(r'^carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'),
url(r'^carrinho/excluir_carrinho/$', 'excluir_carrinho', name='excluir-carrinho'), #tagerror 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'^carrinho/deleta_itens_carrinho$', 'deleta_itens_carrinho', name='deleta-itens-carrinho'), # tagerror
url(r'^csv/$', 'export_csv', name='convenios-csv'), url(r'^csv/$', 'export_csv', name='convenios-csv'),
url(r'^reportsRegiao/(?P<regiao>\w+)/$', 'report_regiao', name='convenios-report_regiao_pdf'), url(r'^reportsRegiao/(?P<regiao>\w+)/$', 'report_regiao', name='convenios-report_regiao_pdf'),
) )

6
sigi/apps/diagnosticos/urls.py

@ -32,8 +32,8 @@ urlpatterns = patterns('sigi.apps.diagnosticos.views',
url(r'^diagnostico/(?P<id_diagnostico>\w+).pdf$', 'diagnostico_pdf', name='diagnostico-pdf'), url(r'^diagnostico/(?P<id_diagnostico>\w+).pdf$', 'diagnostico_pdf', name='diagnostico-pdf'),
# Graficos de perguntas # Graficos de perguntas
url(r'^graficos/$', 'graficos', name="diagnosticos-graficos"), #tagerror url(r'^graficos/$', 'graficos', name="diagnosticos-graficos"), # tagerror
url(r'^api/$', 'grafico_api', name="diagnosticos-grafico-api"), #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 # Logout do Diagnóstico
url(r'^mobile/logout/$', 'logout', url(r'^mobile/logout/$', 'logout',
{'next_page': LOGIN_REDIRECT_URL}, name='logout'), {'next_page': LOGIN_REDIRECT_URL}, name='logout'),
) )

12
sigi/apps/metas/urls.py

@ -3,10 +3,10 @@ from django.conf.urls import patterns, url
urlpatterns = patterns('sigi.apps.metas.views', urlpatterns = patterns('sigi.apps.metas.views',
url(r'^$', 'dashboard', name='metas-dashboardsss'), #tagerror url(r'^$', 'dashboard', name='metas-dashboardsss'), # tagerror
url(r'^mapa/$', 'mapa', name='metas-mapa'), #tagerror url(r'^mapa/$', 'mapa', name='metas-mapa'), # tagerror
url(r'^mapdata/$', 'map_data', name='metas-map_data'), url(r'^mapdata/$', 'map_data', name='metas-map_data'),
url(r'^mapsearch/$', 'map_search', name='metas-map_search'), url(r'^mapsearch/$', 'map_search', name='metas-map_search'),
url(r'^mapsum/$', 'map_sum', name='metas-map_sum'), url(r'^mapsum/$', 'map_sum', name='metas-map_sum'),
url(r'^maplist/$', 'map_list', name='metas-map_list'), url(r'^maplist/$', 'map_list', name='metas-map_list'),
) )

12
sigi/apps/parlamentares/urls.py

@ -3,14 +3,14 @@ from django.conf.urls import patterns, url
urlpatterns = patterns('sigi.apps.parlamentares.views', urlpatterns = patterns('sigi.apps.parlamentares.views',
# Reports labels parlamentares # Reports labels parlamentares
url(r'^labels/$', 'labels_report', name='labels-report-all'), url(r'^labels/$', 'labels_report', name='labels-report-all'),
url(r'^(?P<id>\w+)/labels/$', 'labels_report', name='labels-report-id'), url(r'^(?P<id>\w+)/labels/$', 'labels_report', name='labels-report-id'),
# Carrinho # Carrinho
url(r'^carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'), url(r'^carrinho/$', 'visualizar_carrinho', name='visualizar-carrinho'),
url(r'^carrinho/deleta_itens_carrinho$', 'deleta_itens_carrinho', name='deleta-itens-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'), # url(r'^carrinho/exluir_carrinho$', 'excluir_carrinho', name='excluir-carrinho'),
) )

8
sigi/apps/servicos/urls.py

@ -6,8 +6,8 @@ from .views import MapaView
urlpatterns = patterns('sigi.apps.servicos.views', urlpatterns = patterns('sigi.apps.servicos.views',
url(r'^manifesta/$', 'casa_manifesta_view', name="casa-manifesta-view"), url(r'^manifesta/$', 'casa_manifesta_view', name="casa-manifesta-view"),
url(r'^munatenjson/(?P<servico>\w+)/$', 'municipios_atendidos', name="municipios-atendidos"), url(r'^munatenjson/(?P<servico>\w+)/$', 'municipios_atendidos', name="municipios-atendidos"),
url(r'^mapa/(?P<servico>\w+)/$', MapaView.as_view(), name="servicos-mapa"), url(r'^mapa/(?P<servico>\w+)/$', MapaView.as_view(), name="servicos-mapa"),
# url(r'^listacasas/(?P<sigla>\w+)', 'casas_usam_servico', name="casas-usam-servico"), # url(r'^listacasas/(?P<sigla>\w+)', 'casas_usam_servico', name="casas-usam-servico"),
) )
Loading…
Cancel
Save