From 387950f38dff2e9fe456ac3a834a4a3a91c223db Mon Sep 17 00:00:00 2001 From: Breno Teixeira Date: Mon, 3 Feb 2014 12:03:03 -0200 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20dos=20static=20files=20pat?= =?UTF-8?q?h=20e=20layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- media/css/base_site.css | 6 +- sigi.db | Bin 269312 -> 272384 bytes sigi/apps/casas/views.py | 2 +- sigi/apps/contatos/admin.py | 4 +- sigi/apps/contatos/models.py | 1 - .../templates/diagnosticos/graficos.html | 11 +-- .../apps/metas/templates/metas/dashboard.html | 1 - sigi/apps/servidores/admin.py | 2 +- sigi/urls.py | 1 + templates/admin/app_index.html | 2 +- templates/admin/carrinho.html | 6 +- templates/admin/index.html | 73 ------------------ templates/admin/tabs_style.html | 4 +- 13 files changed, 21 insertions(+), 92 deletions(-) delete mode 100644 templates/admin/index.html diff --git a/media/css/base_site.css b/media/css/base_site.css index 35315ac..ea664e2 100644 --- a/media/css/base_site.css +++ b/media/css/base_site.css @@ -25,7 +25,7 @@ a:hover { } #nav-global ul { /*background:#222;*/ - background: #efefef url("../../admin_media/img/admin/nav-bg.gif"); + background: #efefef url("../../static/admin/img/nav-bg.gif"); /*#9C9C9C;*/ height: 25px; margin: 0; @@ -195,7 +195,7 @@ div#footer a { /* JQuery */ .tabs-conteudo li { border: 1px solid #CCC; - background-image: url("/sigi/admin_media/img/admin/nav-bg.gif"); + background-image: url("../../static/admin/img/nav-bg.gif"); display: inline; padding: 4px 8px; } @@ -206,7 +206,7 @@ div#footer a { .conteudo_regiao li{ border: 1px solid #CCC; - background-image: url("/sigi/admin_media/img/admin/nav-bg.gif"); + background-image: url("../../static/admin/img/nav-bg.gif"); padding: 4px 8px; width: 30%; list-style: none; diff --git a/sigi.db b/sigi.db index c6ba3629e97b30af8d2e3f008dcf179f78527ac9..459372cdab35617265cf96a11e0be00d6e35be34 100644 GIT bin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^4(;NOgs(rlHbhN@c!MYMbUs4GT97!%)~dr*yfh zn@4%I1*lX&rMLptv5G1{nY)dvkbfu+E5c{q2#x;MB9B%yUL7qB-!95!?-IORw2Niy yXxmWS&l8_?;bD+VFE4SZ4aI$&@ud3@V~oAD*ts?ompI@_cO}n+ciCI)==>i^H+sha delta 450 zcmXYr&r4Kc6o$X=yvKX5!!*p8HgIz><0!On9IsPTYDAIHMp96Ou!Uw4!zzyv|+JerArR_%jep$E`atCVv0~#WVXXP#m z2SwB?W{{*tFGytqTwQtdZT3}qWH|9UJ@{rc PJ3f&f%8sk~Fpu&ThiHG( diff --git a/sigi/apps/casas/views.py b/sigi/apps/casas/views.py index d900f91..8ba3219 100644 --- a/sigi/apps/casas/views.py +++ b/sigi/apps/casas/views.py @@ -95,7 +95,7 @@ def visualizar_carrinho(request): return render_to_response( 'casas/carrinho.html', { - "ADMIN_MEDIA_PREFIX":settings.ADMIN_MEDIA_PREFIX, + # "ADMIN_MEDIA_PREFIX":settings.ADMIN_MEDIA_PREFIX, 'MEDIA_URL':settings.MEDIA_URL, 'carIsEmpty':carrinhoIsEmpty, 'paginas':paginas, diff --git a/sigi/apps/contatos/admin.py b/sigi/apps/contatos/admin.py index 114429f..f2b2f68 100644 --- a/sigi/apps/contatos/admin.py +++ b/sigi/apps/contatos/admin.py @@ -3,12 +3,14 @@ from django.contrib import admin from sigi.apps.contatos.models import (UnidadeFederativa, Municipio, Telefone, Contato) from sigi.apps.utils import queryset_ascii +from sigi.apps.contatos.filters import PopulationFilter + class UnidadeFederativaAdmin(admin.ModelAdmin): actions = None list_display = ('codigo_ibge', 'nome', 'sigla', 'regiao', 'populacao') list_display_links = ('codigo_ibge', 'nome') - list_filter = ('regiao', 'populacao') + list_filter = ('regiao', 'populacao', PopulationFilter,) search_fields = ('search_text', 'codigo_ibge', 'sigla', 'regiao') queryset = queryset_ascii diff --git a/sigi/apps/contatos/models.py b/sigi/apps/contatos/models.py index 3f483c9..846f468 100644 --- a/sigi/apps/contatos/models.py +++ b/sigi/apps/contatos/models.py @@ -33,7 +33,6 @@ class UnidadeFederativa(models.Model): ) regiao = models.CharField('região', max_length=2, choices=REGIAO_CHOICES) populacao = models.PositiveIntegerField('população') - populacao.list_filter_range = [100000, 1000000, 10000000] class Meta: ordering = ('nome',) diff --git a/sigi/apps/diagnosticos/templates/diagnosticos/graficos.html b/sigi/apps/diagnosticos/templates/diagnosticos/graficos.html index 5483528..f7c30a0 100644 --- a/sigi/apps/diagnosticos/templates/diagnosticos/graficos.html +++ b/sigi/apps/diagnosticos/templates/diagnosticos/graficos.html @@ -1,4 +1,4 @@ -{% extends "index.html" %} +{% extends "admin/index.html" %} {% block content_title %}

Graficos dos Diagnósticos

{% endblock %} @@ -37,21 +37,22 @@ jQuery(document).ready(function () {
    {% for pergunta in perguntas %} + {{ pergunta }}
  • {% if pergunta.datatype == 'many' or pergunta.datatype == 'one' %} -

    {{pergunta.title}}

    -
    +

    {{ pergunta.title }}

    +
    {% else %} -

    {{pergunta.title}}

    +

    {{ pergunta.title }}

    {% endif %}
  • {% endfor %} diff --git a/sigi/apps/metas/templates/metas/dashboard.html b/sigi/apps/metas/templates/metas/dashboard.html index f4f67ec..e145551 100644 --- a/sigi/apps/metas/templates/metas/dashboard.html +++ b/sigi/apps/metas/templates/metas/dashboard.html @@ -1,5 +1,4 @@ {% extends "admin/index.html" %} -{% load adminmedia %} {% block title %}SIGI{% endblock %} diff --git a/sigi/apps/servidores/admin.py b/sigi/apps/servidores/admin.py index f98a14a..facde37 100644 --- a/sigi/apps/servidores/admin.py +++ b/sigi/apps/servidores/admin.py @@ -36,7 +36,7 @@ class ServidorFilter(AlphabeticFilter): class LicencaAdmin(admin.ModelAdmin): form = LicencaForm list_display = ('servidor', 'inicio_licenca', 'fim_licenca') - list_filter = (ServidorFilter, 'servidor', 'inicio_licenca', 'fim_licenca') + list_filter = (ServidorFilter, 'inicio_licenca', 'fim_licenca') search_fields = ('obs', 'servidor__nome_completo', 'servidor__email_pessoal', 'servidor__user__email', 'servidor__user__username') diff --git a/sigi/urls.py b/sigi/urls.py index ef22ffe..4c9fca6 100644 --- a/sigi/urls.py +++ b/sigi/urls.py @@ -5,6 +5,7 @@ from django.conf import settings from django.conf.urls.static import static from django.contrib import admin +admin.site.index_template = 'index.html' admin.autodiscover() urlpatterns = patterns('', diff --git a/templates/admin/app_index.html b/templates/admin/app_index.html index 580e1be..2f42f44 100644 --- a/templates/admin/app_index.html +++ b/templates/admin/app_index.html @@ -1,4 +1,4 @@ -{% extends "admin/app_index.html" %} +{% extends "admin/index.html" %} {% block extrastyle %} .botoes{ - /*background: url("{{ADMIN_MEDIA_PREFIX}}img/admin/nav-bg.gif");*/ + /*background: url("../../static/admin/img/nav-bg.gif");*/ font-weight: bold; /*color: red;*/ } @@ -16,7 +16,7 @@ color: blue; } .botoes li { - background-image: url("{{ADMIN_MEDIA_PREFIX}}img/admin/nav-bg.gif"); + background-image: url("../../static/admin/img/nav-bg.gif"); display: inline; border: 1px solid #CCC; padding: 5px 10px; @@ -27,7 +27,7 @@ } .botao_excluir input{ color: red; - background: url("{{ADMIN_MEDIA_PREFIX}}img/admin/icon_deletelink.gif") no-repeat scroll 0 50% transparent + background: url("../../static/admin/img/icon_deletelink.gif") no-repeat scroll 0 50% transparent } diff --git a/templates/admin/index.html b/templates/admin/index.html deleted file mode 100644 index 88def54..0000000 --- a/templates/admin/index.html +++ /dev/null @@ -1,73 +0,0 @@ -{% extends "admin/base_site.html" %} -{% load i18n admin_static %} - -{% block title %}SIGI{% endblock %} - -{% block extrahead %} - {{ block.super }} - - - - - -{% endblock %} - -{% block content_title %}

    Dashboard

    {% endblock %} - -{% block extrastyle %}{{ block.super }}{% endblock %} - -{% block coltype %}colMS{% endblock %} - -{% block bodyclass %}dashboard{% endblock %} - -{% block breadcrumbs %}{% endblock %} - -{% block content %} -
    - {% include "snippets/modules/charts-convenios.html" %} -
    -{% endblock %} - -{% block sidebar %} - -{% endblock %} diff --git a/templates/admin/tabs_style.html b/templates/admin/tabs_style.html index 939c1d3..a7f5d0e 100644 --- a/templates/admin/tabs_style.html +++ b/templates/admin/tabs_style.html @@ -8,7 +8,7 @@ - +