Compare commits

...

2 Commits

Author SHA1 Message Date
Marce Coll
603e6dba2b Merge branch 'main' of ssh://git.lajuntament.space:2222/lajuntament/absencia-de-presencia 2021-11-27 12:43:05 +01:00
Marce Coll
8449700e68 Static 2021-11-27 12:41:54 +01:00
4 changed files with 29 additions and 1 deletions

11
index.html Normal file
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>

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():

0
static/index.js Normal file
View File

11
templates/index.html Normal file
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>