Compare commits

...
2 Commits
4 changed files with 29 additions and 1 deletions

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
<html>
<head>
<title>Absencia de Presencia</title>
</head>
<body>
<form>
<input type="text"/>
<input type="submit"/>
</form>
</body>
</html>
+7 -1
View File
@@ -22,12 +22,18 @@ def handle_errors(func):
return func(*args, **kwargs) return func(*args, **kwargs)
except HTTPError as r: except HTTPError as r:
return r, r.status_code 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 flask.Response("Oh no! Hi ha hagut un error en el servidor :(", status="Internal error"), 500
return wrapped return wrapped
@app.route("/")
def index():
return flask.render_template("./index.html")
@app.route("/calcula", methods=['POST']) @app.route("/calcula", methods=['POST'])
@handle_errors @handle_errors
def calcula(): def calcula():
View File
Whitespace-only changes.
+11
View File
@@ -0,0 +1,11 @@
<html>
<head>
<title>Absencia de Presencia</title>
</head>
<body>
<form>
<input type="text"/>
<input type="submit"/>
</form>
</body>
</html>