Static
This commit is contained in:
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>
|
||||||
10
main.py
10
main.py
@@ -5,8 +5,6 @@ import flask
|
|||||||
|
|
||||||
from werkzeug.wsgi import FileWrapper
|
from werkzeug.wsgi import FileWrapper
|
||||||
|
|
||||||
import dibuixa
|
|
||||||
|
|
||||||
app = flask.Flask(__name__)
|
app = flask.Flask(__name__)
|
||||||
|
|
||||||
|
|
||||||
@@ -23,16 +21,16 @@ 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("/")
|
@app.route("/")
|
||||||
@handle_errors
|
def index():
|
||||||
def hola(code):
|
return flask.render_template("./index.html")
|
||||||
return "Hola"
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
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