diff --git a/sigi/apps/casas/reports.py b/sigi/apps/casas/reports.py index b993a31..1cb8a1d 100644 --- a/sigi/apps/casas/reports.py +++ b/sigi/apps/casas/reports.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from django.templatetags.static import static from django.utils.translation import ugettext as _ from geraldo import Report, DetailBand, Label, ObjectValue, ReportGroup, ReportBand, landscape, SubReport, BAND_WIDTH, SystemField from geraldo.graphics import Image @@ -7,7 +8,6 @@ from reportlab.lib.pagesizes import A4 from reportlab.lib.units import cm from sigi.apps.relatorios.reports import ReportDefault -from sigi.settings import STATICFILES_DIRS def string_to_cm(texto): @@ -187,11 +187,11 @@ class CasasLegislativasReport(ReportDefault): elements = list(ReportDefault.band_page_header.elements) elements = [ - Image(filename='%s/img/logo-interlegis.jpg' % STATICFILES_DIRS, + Image(filename=static('img/logo-interlegis.jpg'), left=23.5 * cm, right=1 * cm, top=0.1 * cm, bottom=1 * cm, width=4.2 * cm, height=3 * cm, ), - Image(filename='%s/img/logo-senado.png' % STATICFILES_DIRS, + Image(filename=static('img/logo-senado.png'), left=1 * cm, right=1 * cm, top=0.1 * cm, bottom=1 * cm, width=3 * cm, height=3 * cm, ), diff --git a/sigi/apps/casas/views.py b/sigi/apps/casas/views.py index a031d7d..c1ba13d 100644 --- a/sigi/apps/casas/views.py +++ b/sigi/apps/casas/views.py @@ -104,7 +104,6 @@ def visualizar_carrinho(request): request, 'casas/carrinho.html', { - 'MEDIA_URL': settings.MEDIA_URL, 'carIsEmpty': carrinhoIsEmpty, 'paginas': paginas, 'query_str': '?' + request.META['QUERY_STRING'] diff --git a/sigi/apps/convenios/templates/convenios/tabela_regiao.html b/sigi/apps/convenios/templates/convenios/tabela_regiao.html index 48db3eb..ad17d13 100644 --- a/sigi/apps/convenios/templates/convenios/tabela_regiao.html +++ b/sigi/apps/convenios/templates/convenios/tabela_regiao.html @@ -1,3 +1,4 @@ +{% load static from staticfiles %} {% load i18n %}
@@ -29,11 +30,11 @@ margin-right: 1cm; height: 1cm; } - } + } body{ font-family: 'Helvetica'; font-size: 9pt; - } + } #corpo h1{ text-align: center; } @@ -53,13 +54,13 @@ padding-top: 0.15cm; } #footerContent #esquerda{ - text-align: left; + text-align: left; } #footerContent #direita{ text-align: right; - background-image: url("/media/images/logo-senado.png"); - } - .tabela { + background-image: url("{% static 'img/logo-senado.png' %}"); + } + .tabela { padding-top: 0.1cm; padding-left: 0.1cm; border: black solid; @@ -71,7 +72,7 @@ font-weight: bold; font-size: 11pt; } - .tabela th{ + .tabela th{ background-color: #CFCFCF; text-align: left; } @@ -81,13 +82,13 @@ .tabela .sumario{ font-weight: bold; background-color: #CFCFCF; - } + } .tabela .cabecalho_esquerda{ background-color: #E8E8E8; font-weight: bold; } - + @@ -95,13 +96,13 @@+ | {% trans 'SENADO FEDERAL' %} {% trans 'SINTER - Secretaria Especial do Interlegis' %} |
- - | + |
{{linha.estado}} | @@ -132,7 +133,7 @@
---|