diff options
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 |