Commit be50999fcdb699f05ae310137e0aa797cfbffe4b
1 parent
9b067429
Exists in
master
barrabrasil.py: adicionando o config para utilizar a barra correta. build.sh: ge…
…ra o arquivo profile conforme par?metro. README: adicionado referencia a nova depend?ncia
Showing
3 changed files
with
10 additions
and
6 deletions
Show diff stats
LEIAME
... | ... | @@ -9,6 +9,9 @@ Dependências: |
9 | 9 | # sudo pip install flask |
10 | 10 | - assetgen |
11 | 11 | # sudo pip install assetgen |
12 | + | |
13 | + - Config | |
14 | + # sudo pip install config | |
12 | 15 | - node.js |
13 | 16 | # sudo apt-get install python-software-properties python g++ make |
14 | 17 | # sudo add-apt-repository ppa:chris-lea/node.js | ... | ... |
app/barrabrasil.py
1 | 1 | from flask import Flask, url_for, render_template, request, Response, make_response |
2 | +from config import Config | |
2 | 3 | import hashlib#,webbrowser |
3 | 4 | |
4 | 5 | # Criar Key e certificado |
... | ... | @@ -39,11 +40,9 @@ def barra(): |
39 | 40 | return resposta |
40 | 41 | |
41 | 42 | if __name__ == '__main__': |
42 | - from sys import argv | |
43 | - if len(argv) > 1: | |
44 | - profile = argv[1] | |
45 | - else: | |
46 | - profile = 'default' | |
43 | + f = file('profile') | |
44 | + cfg = Config(f) | |
45 | + profile = cfg.profile | |
47 | 46 | #webbrowser.open("http://127.0.0.1:5000/",new=2) |
48 | 47 | app.run(debug=False) |
49 | 48 | #webbrowser.open("https://127.0.0.1:5000/",new=2) | ... | ... |
build.sh