Compare commits
2 Commits
1c2ee7238a
...
603e6dba2b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
603e6dba2b | ||
|
|
8449700e68 |
11
index.html
Normal file
11
index.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Absencia de Presencia</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form>
|
||||||
|
<input type="text"/>
|
||||||
|
<input type="submit"/>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
8
main.py
8
main.py
@@ -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
0
static/index.js
Normal file
11
templates/index.html
Normal file
11
templates/index.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Absencia de Presencia</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form>
|
||||||
|
<input type="text"/>
|
||||||
|
<input type="submit"/>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user