Commit 95e11b328b8e0d7a6008808e70b9792dad9ad11a

Authored by Augusto Herrmann
1 parent b29e20ad
Exists in master

tratando o javascript gerado como um arquivo em vez de um template

Showing 2 changed files with 4 additions and 2 deletions   Show diff stats
app/barrabrasil.py
@@ -27,7 +27,9 @@ def barra(): @@ -27,7 +27,9 @@ def barra():
27 # 'verde': '#00500F', 27 # 'verde': '#00500F',
28 #} 28 #}
29 #cor = paleta.get(nome_cor, '#004B82') 29 #cor = paleta.get(nome_cor, '#004B82')
30 - conteudo = render_template('barra-brasil.js') 30 + #conteudo = render_template('barra-brasil.js', cor=cor)
  31 + with app.open_resource('templates/barra-brasil.js') as f:
  32 + conteudo = f.read().decode('utf-8')
31 etag = hashlib.sha1(conteudo.encode('utf-8')).hexdigest() 33 etag = hashlib.sha1(conteudo.encode('utf-8')).hexdigest()
32 if request.if_none_match and \ 34 if request.if_none_match and \
33 etag in request.if_none_match: 35 etag in request.if_none_match:
assets/estilo-barra.scss
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 License: none (public domain) 3 License: none (public domain)
4 */ 4 */
5 5
6 -/*Css reset mínimo*/ 6 +/* Css reset mínimo */
7 #barra-brasil { 7 #barra-brasil {
8 div, a, ul, li { 8 div, a, ul, li {
9 margin: 0; 9 margin: 0;