diff options
author | Santo Cariotti <sancn@live.com> | 2017-07-21 19:32:11 +0200 |
---|---|---|
committer | Santo Cariotti <sancn@live.com> | 2017-07-21 19:32:11 +0200 |
commit | e3496045ef68b1e83e5570b2608f14b2fcdb49f2 (patch) | |
tree | 5a638dfb2dca5cb7ff99761ec0f7261525ea81d7 /lib/web.py | |
parent | 879853058107f0cc9daba12e7c7c483177fe65dc (diff) |
added web style
Diffstat (limited to 'lib/web.py')
-rw-r--r-- | lib/web.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/web.py b/lib/web.py new file mode 100644 index 0000000..69522f8 --- /dev/null +++ b/lib/web.py @@ -0,0 +1,12 @@ +from flask import Flask, render_template +from .classes import r + +app = Flask(__name__) + +@app.route("/") +def hello(): + lista = r.zrange('todo', 0, -1) + try: + return render_template("index.html", list_todo = lista, len_todo = len(lista)) + except Exception as e: + return 'errore: %s' % e |