From 0070ab21fcee19f7ae1f2a0f868054f7d6daa2ad Mon Sep 17 00:00:00 2001 From: Breno Date: Mon, 24 Mar 2014 15:32:13 -0300 Subject: [PATCH] Retirada do /sigi/ das urls --- sigi/apps/diagnosticos/models.py | 2 +- .../templates/diagnosticos/graficos.html | 2 +- .../templates/diagnosticos/mapa.html | 4 ++-- sigi/apps/diagnosticos/tests.py | 2 +- sigi/apps/diagnosticos/urls.py | 2 +- sigi/apps/metas/templates/metas/mapa.html | 6 +++--- sigi/apps/metas/views.py | 2 +- .../servicos/templates/servicos/mapa.html | 4 ++-- .../servidores/servidor/change_list.html | 4 ++-- sigi/settings.py | 1 - sigi/urls.py | 19 +++++++++---------- sigiStatic/js/metas/mapa.js | 8 ++++---- templates/admin/base_site.html | 2 +- templates/index.html | 4 ++-- .../snippets/modules/charts-convenios.html | 8 ++++---- 15 files changed, 34 insertions(+), 36 deletions(-) diff --git a/sigi/apps/diagnosticos/models.py b/sigi/apps/diagnosticos/models.py index 29603c9..2392e1b 100644 --- a/sigi/apps/diagnosticos/models.py +++ b/sigi/apps/diagnosticos/models.py @@ -132,7 +132,7 @@ class Diagnostico(BaseEntity): return str(self.casa_legislativa).decode('utf8') def get_absolute_url(self): - return "/sigi/diagnosticos/diagnostico/%i.pdf" % (self.id, ) + return "/diagnosticos/diagnostico/%i.pdf" % (self.id, ) class Categoria(models.Model): diff --git a/sigi/apps/diagnosticos/templates/diagnosticos/graficos.html b/sigi/apps/diagnosticos/templates/diagnosticos/graficos.html index cf96ed9..60c587f 100644 --- a/sigi/apps/diagnosticos/templates/diagnosticos/graficos.html +++ b/sigi/apps/diagnosticos/templates/diagnosticos/graficos.html @@ -48,7 +48,7 @@ jQuery(document).ready(function () { {{ pergunta }}
  • {% if pergunta.datatype == 'many' or pergunta.datatype == 'one' %} -

    {{ pergunta.title }}

    +

    {{ pergunta.title }}

    diff --git a/sigi/apps/diagnosticos/templates/diagnosticos/mapa.html b/sigi/apps/diagnosticos/templates/diagnosticos/mapa.html index 565059b..3488e4c 100644 --- a/sigi/apps/diagnosticos/templates/diagnosticos/mapa.html +++ b/sigi/apps/diagnosticos/templates/diagnosticos/mapa.html @@ -22,14 +22,14 @@ var map = new google.maps.Map(document.getElementById("map"), myOptions); - $.get("/sigi/diagnosticos/mundiagjson/", function(municipios) { + $.get("/diagnosticos/mundiagjson/", function(municipios) { for (var i in municipios) { var municipio = municipios[i]; var markData = { map: map, position: new google.maps.LatLng(municipio.lat, municipio.lng), title: municipio.nome, - icon: '{{ MEDIA_URL }}images/mapmarker.png' //'/sigi/media/images/mapmarker.png' + icon: '{{ MEDIA_URL }}images/mapmarker.png' } var mark = new google.maps.Marker(markData); var infoWin = new google.maps.InfoWindow({content: diff --git a/sigi/apps/diagnosticos/tests.py b/sigi/apps/diagnosticos/tests.py index acf958e..dfe01f4 100644 --- a/sigi/apps/diagnosticos/tests.py +++ b/sigi/apps/diagnosticos/tests.py @@ -10,6 +10,6 @@ class DiagnosticosViewsTest(TestCase): def test_diagnostico_list_success(self): - response = self.client.get('/sigi/mobile/diagnosticos') + response = self.client.get('/mobile/diagnosticos') self.assertEquals(200, response.status_code) self.assertTemplateUsed(response, 'diagnosticos/diagnosticos_list.html') diff --git a/sigi/apps/diagnosticos/urls.py b/sigi/apps/diagnosticos/urls.py index 98286e2..881ca50 100644 --- a/sigi/apps/diagnosticos/urls.py +++ b/sigi/apps/diagnosticos/urls.py @@ -3,7 +3,7 @@ from django.conf.urls import patterns, url from django.views.generic import TemplateView -LOGIN_REDIRECT_URL = '/sigi/diagnosticos/mobile/login' +LOGIN_REDIRECT_URL = '/diagnosticos/mobile/login' urlpatterns = patterns('sigi.apps.diagnosticos.views', # Lista de Diagnósticos diff --git a/sigi/apps/metas/templates/metas/mapa.html b/sigi/apps/metas/templates/metas/mapa.html index 0bf22d4..5dc64e5 100644 --- a/sigi/apps/metas/templates/metas/mapa.html +++ b/sigi/apps/metas/templates/metas/mapa.html @@ -29,9 +29,9 @@ diff --git a/sigi/apps/metas/views.py b/sigi/apps/metas/views.py index 231bad1..5a62f65 100644 --- a/sigi/apps/metas/views.py +++ b/sigi/apps/metas/views.py @@ -300,7 +300,7 @@ def gera_map_data_file(cronjob=False): } for sv in c.servico_set.all(): - casa['info'].append(u"%s ativado em %s link" % ( + casa['info'].append(u"%s ativado em %s link" % ( sv.tipo_servico.nome, sv.data_ativacao.strftime('%d/%m/%Y') if sv.data_ativacao else u'', sv.url)) casa['seit'].append(sv.tipo_servico.sigla) diff --git a/sigi/apps/servicos/templates/servicos/mapa.html b/sigi/apps/servicos/templates/servicos/mapa.html index 53b28f6..c5493c7 100644 --- a/sigi/apps/servicos/templates/servicos/mapa.html +++ b/sigi/apps/servicos/templates/servicos/mapa.html @@ -22,14 +22,14 @@ var map = new google.maps.Map(document.getElementById("map"), myOptions); - $.get("/sigi/servicos/munatenjson/{{ params.servico }}", function(municipios) { + $.get("/servicos/munatenjson/{{ params.servico }}", function(municipios) { for (var i in municipios) { var municipio = municipios[i]; var markData = { map: map, position: new google.maps.LatLng(municipio.lat, municipio.lng), title: municipio.nome, - icon: '{{ MEDIA_URL }}images/mapmarker.png' //'/sigi/media/images/mapmarker.png' + icon: '{{ MEDIA_URL }}images/mapmarker.png' } var mark = new google.maps.Marker(markData); var infoWin = new google.maps.InfoWindow({content: diff --git a/sigi/apps/servidores/templates/admin/servidores/servidor/change_list.html b/sigi/apps/servidores/templates/admin/servidores/servidor/change_list.html index f688d16..c9ba500 100644 --- a/sigi/apps/servidores/templates/admin/servidores/servidor/change_list.html +++ b/sigi/apps/servidores/templates/admin/servidores/servidor/change_list.html @@ -4,10 +4,10 @@ {% block object-tools %}
    • - Relatório por cargo + Relatório por cargo
    • - Relatório por função + Relatório por função
    • {% if has_add_permission %}
    • diff --git a/sigi/settings.py b/sigi/settings.py index ba48432..59d3ba4 100644 --- a/sigi/settings.py +++ b/sigi/settings.py @@ -115,7 +115,6 @@ STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'sigiStatic'), ) -# ADMIN_MEDIA_PREFIX = '/sigi/admin_media/' # Deprecated! DEFAULT_FROM_EMAIL = 'sesostris@interlegis.leg.br' diff --git a/sigi/urls.py b/sigi/urls.py index 75772ab..8789108 100644 --- a/sigi/urls.py +++ b/sigi/urls.py @@ -1,6 +1,6 @@ #-*- coding:utf-8 -*- from django.conf.urls import patterns, include, url -from django.views.generic.base import RedirectView, TemplateView +from django.views.generic.base import TemplateView from django.conf import settings from django.conf.urls.static import static @@ -9,18 +9,17 @@ admin.site.index_template = 'index.html' admin.autodiscover() urlpatterns = patterns('', - url(r'^$', RedirectView.as_view(url='/sigi/'), name='go-to-sigi'), - url(r'^sigi/parlamentares/parlamentar/', include('sigi.apps.parlamentares.urls')), - url(r'^sigi/casas/casalegislativa/', include('sigi.apps.casas.urls')), - url(r'^sigi/convenios/convenio/', include('sigi.apps.convenios.urls')), - url(r'^sigi/diagnosticos/', include('sigi.apps.diagnosticos.urls')), - url(r'^sigi/servidores/', include('sigi.apps.servidores.urls')), - url(r'^sigi/servicos/', include('sigi.apps.servicos.urls')), - url(r'^sigi/dashboard/', include('sigi.apps.metas.urls')), + 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'^diagnosticos/', include('sigi.apps.diagnosticos.urls')), + 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'^sigi/', include(admin.site.urls)), + url(r'^', include(admin.site.urls)), ) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) if settings.DEBUG: diff --git a/sigiStatic/js/metas/mapa.js b/sigiStatic/js/metas/mapa.js index f676854..a3b1b4b 100644 --- a/sigiStatic/js/metas/mapa.js +++ b/sigiStatic/js/metas/mapa.js @@ -22,7 +22,7 @@ function ajax_submit(event) { $.ajax({ - url: "/sigi/dashboard/mapdata/", + url: "/dashboard/mapdata/", type: 'GET', cache: true, success: function(return_data) { @@ -39,7 +39,7 @@ map: null, // Just create the mark, dont plot it position: new google.maps.LatLng(parseFloat(municipio.lat), parseFloat(municipio.lng)), title: municipio.nome, - icon: '/sigi/media/images/' + municipio.icone + '.png' + icon: '/media/images/' + municipio.icone + '.png' } var mark = new google.maps.Marker(markData); var infoWin = new google.maps.InfoWindow({content: '' + municipio.nome + '

      ' + municipio.info }); @@ -141,7 +141,7 @@ function search(event) { $.ajax({ - url: "/sigi/dashboard/mapsearch/", + url: "/dashboard/mapsearch/", type: 'GET', data: $("#changelist-search").serializeArray(), cache: true, @@ -193,4 +193,4 @@ return false; } -})(django.jQuery); \ No newline at end of file +})(django.jQuery); diff --git a/templates/admin/base_site.html b/templates/admin/base_site.html index 9efd262..fd0e6c7 100644 --- a/templates/admin/base_site.html +++ b/templates/admin/base_site.html @@ -32,7 +32,7 @@ {% block branding %}

      - Sistema de Informações Gerenciais do Interlegis + Sistema de Informações Gerenciais do Interlegis

      {% endblock %} diff --git a/templates/index.html b/templates/index.html index 960845c..0b36dc0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -21,14 +21,14 @@ var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); - $.get("/sigi/diagnosticos/mundiagjson/", function(municipios) { + $.get("/diagnosticos/mundiagjson/", function(municipios) { for (var i in municipios) { var municipio = municipios[i]; var markData = { map: map, position: new google.maps.LatLng(municipio.lat, municipio.lng), title: municipio.nome, - icon: '{{ STATIC_URL }}img/mapmarker.png' //'/sigi/media/images/mapmarker.png' + icon: '{{ STATIC_URL }}img/mapmarker.png' } var mark = new google.maps.Marker(markData); var infoWin = new google.maps.InfoWindow({content: diff --git a/templates/snippets/modules/charts-convenios.html b/templates/snippets/modules/charts-convenios.html index 929a2e1..b6984a0 100644 --- a/templates/snippets/modules/charts-convenios.html +++ b/templates/snippets/modules/charts-convenios.html @@ -59,7 +59,7 @@

      Serviços

      - +

      Serviços hospedados no Interlegis (SEIT)

      @@ -117,7 +117,7 @@

      Atendimentos

      Mapa de atuação do Interlegis

      - +
      {% comment %}

      Metas BID

      @@ -154,10 +154,10 @@ {{ data.count }} {% endfor %} - Ver mapa ampliado + Ver mapa ampliado
      -{% endcomment %} \ No newline at end of file +{% endcomment %}