From 95e11b328b8e0d7a6008808e70b9792dad9ad11a Mon Sep 17 00:00:00 2001 From: Augusto Herrmann Date: Mon, 9 Sep 2013 16:16:43 -0300 Subject: [PATCH] tratando o javascript gerado como um arquivo em vez de um template --- app/barrabrasil.py | 4 +++- assets/estilo-barra.scss | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/barrabrasil.py b/app/barrabrasil.py index 583c3e4..303afbd 100644 --- a/app/barrabrasil.py +++ b/app/barrabrasil.py @@ -27,7 +27,9 @@ def barra(): # 'verde': '#00500F', #} #cor = paleta.get(nome_cor, '#004B82') - conteudo = render_template('barra-brasil.js') + #conteudo = render_template('barra-brasil.js', cor=cor) + with app.open_resource('templates/barra-brasil.js') as f: + conteudo = f.read().decode('utf-8') etag = hashlib.sha1(conteudo.encode('utf-8')).hexdigest() if request.if_none_match and \ etag in request.if_none_match: diff --git a/assets/estilo-barra.scss b/assets/estilo-barra.scss index 73770bf..c898144 100755 --- a/assets/estilo-barra.scss +++ b/assets/estilo-barra.scss @@ -3,7 +3,7 @@ License: none (public domain) */ -/*Css reset mínimo*/ +/* Css reset mínimo */ #barra-brasil { div, a, ul, li { margin: 0; -- libgit2 0.21.2