From c15a7d9e1402ddccff676d2190ea09771d6b6615 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Fri, 2 Oct 2015 14:49:10 -0300 Subject: [PATCH] Refactor Painel urls --- painel/urls.py | 14 ++++++-------- painel/views.py | 2 +- sessao/urls.py | 2 +- .../painel/{controller.html => controlador.html} | 0 templates/sessao/painel.html | 12 ++++++------ 5 files changed, 14 insertions(+), 16 deletions(-) rename templates/painel/{controller.html => controlador.html} (100%) diff --git a/painel/urls.py b/painel/urls.py index 563c00df4..a9daf34ec 100644 --- a/painel/urls.py +++ b/painel/urls.py @@ -6,13 +6,11 @@ from .views import (controlador_painel, cronometro_painel_crud, painel_votacao_view) urlpatterns = [ - url(r'^painel$', painel_view, name="painel"), - url(r'^painel/controlador', - controlador_painel, name='controlador_painel'), - url(r'^painel/mensagem', painel_mensagem_view), - url(r'^painel/parlamentares', painel_parlamentares_view), - url(r'^painel/votacao', painel_votacao_view), + url(r'^(?P\d+)/painel$', painel_view, name="painel_principal"), url(r'^painel/(?P\d+)/json_votacao$', json_votacao, name='json_votacao'), - url(r'^painel/cronometro', - include(cronometro_painel_crud.urls)), + url(r'^painel/controlador$', controlador_painel, name='painel_controlador'), + url(r'^painel/mensagem$', painel_mensagem_view, name="painel_mensagem"), + url(r'^painel/parlamentares$', painel_parlamentares_view, name='painel_parlamentares'), + url(r'^painel/votacao$', painel_votacao_view, name='painel_votacao'), + url(r'^painel/cronometro$', include(cronometro_painel_crud.urls)), ] diff --git a/painel/views.py b/painel/views.py index cb7d4c930..a7e88e296 100644 --- a/painel/views.py +++ b/painel/views.py @@ -42,7 +42,7 @@ def controlador_painel(request): painel.save() context = {'painel': painel, 'PAINEL_TYPES': Painel.PAINEL_TYPES} - return render(request, 'painel/controller.html', context) + return render(request, 'painel/controlador.html', context) def cronometro_painel(request): diff --git a/sessao/urls.py b/sessao/urls.py index 39d618436..63ea9d752 100644 --- a/sessao/urls.py +++ b/sessao/urls.py @@ -74,5 +74,5 @@ urlpatterns = [ url(r'^sistema/sessao-plenaria/tipo-resultado-votacao/', include(tipo_resultado_votacao_crud.urls)), url(r'^sistema/sessao-plenaria/tipo-expediente/', - include(tipo_expediente_crud.urls)), + include(tipo_expediente_crud.urls)) ] diff --git a/templates/painel/controller.html b/templates/painel/controlador.html similarity index 100% rename from templates/painel/controller.html rename to templates/painel/controlador.html diff --git a/templates/sessao/painel.html b/templates/sessao/painel.html index 4ea732d73..cf7e224c2 100644 --- a/templates/sessao/painel.html +++ b/templates/sessao/painel.html @@ -6,12 +6,12 @@
Operação do Painel Eletrônico