Commit 61fab014c8ea6a7ba195e151c38951510bd4d479
1 parent
639b6bc1
Exists in
master
corrigido o cabe?alho da barra para application/javascript
Showing
1 changed file
with
4 additions
and
2 deletions
Show diff stats
app/barrabrasil.py
1 | -from flask import Flask, url_for, render_template, request | |
1 | +from flask import Flask, url_for, render_template, request, make_response | |
2 | 2 | app = Flask(__name__) |
3 | 3 | |
4 | 4 | @app.route('/') |
... | ... | @@ -25,7 +25,9 @@ def barra(): |
25 | 25 | 'verde': '#00500F', |
26 | 26 | } |
27 | 27 | cor = paleta.get(nome_cor, '#004B82') |
28 | - return render_template('barra-brasil.js', cor=cor) | |
28 | + resposta = make_response(render_template('barra-brasil.js', cor=cor)) | |
29 | + resposta.headers['Content-type'] = 'application/javascript' | |
30 | + return resposta | |
29 | 31 | |
30 | 32 | if __name__ == '__main__': |
31 | 33 | app.run(debug=True) | ... | ... |