From e3496045ef68b1e83e5570b2608f14b2fcdb49f2 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Fri, 21 Jul 2017 19:32:11 +0200 Subject: added web style --- lib/web.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/web.py (limited to 'lib/web.py') 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 -- cgit v1.2.3-18-g5258