From 8449700e6863d8145d2b7384943d696494f945e4 Mon Sep 17 00:00:00 2001 From: Marce Coll Date: Sat, 27 Nov 2021 12:41:54 +0100 Subject: [PATCH] Static --- index.html | 11 +++++++++++ main.py | 10 ++++------ static/index.js | 0 templates/index.html | 11 +++++++++++ 4 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 index.html create mode 100644 static/index.js create mode 100644 templates/index.html diff --git a/index.html b/index.html new file mode 100644 index 0000000..2b594b8 --- /dev/null +++ b/index.html @@ -0,0 +1,11 @@ + + + Absencia de Presencia + + +
+ + +
+ + diff --git a/main.py b/main.py index 4c0b147..c713326 100644 --- a/main.py +++ b/main.py @@ -5,8 +5,6 @@ import flask from werkzeug.wsgi import FileWrapper -import dibuixa - app = flask.Flask(__name__) @@ -23,16 +21,16 @@ def handle_errors(func): return func(*args, **kwargs) except HTTPError as r: return r, r.status_code - except Exception: + except Exception as e: + print(e) return flask.Response("Oh no! Hi ha hagut un error en el servidor :(", status="Internal error"), 500 return wrapped @app.route("/") -@handle_errors -def hola(code): - return "Hola" +def index(): + return flask.render_template("./index.html") if __name__ == "__main__": diff --git a/static/index.js b/static/index.js new file mode 100644 index 0000000..e69de29 diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..2b594b8 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,11 @@ + + + Absencia de Presencia + + +
+ + +
+ +