Compare commits
3 commits
516d91af98
...
137966a8a1
| Author | SHA1 | Date | |
|---|---|---|---|
| 137966a8a1 | |||
| 2d993a2f11 | |||
| 794d2af1bf |
1 changed files with 12 additions and 3 deletions
13
app.py
13
app.py
|
|
@ -1,10 +1,19 @@
|
|||
from flask import Flask
|
||||
from flask import Flask, request
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route("/")
|
||||
def hello():
|
||||
return "Willkommen in unserem Escape Room!"
|
||||
return "Hallo aus meiner Flask-App!"
|
||||
|
||||
@app.route("/frage", methods=["GET", "POST"])
|
||||
def frage():
|
||||
if request.method == "POST":
|
||||
if request.form["antwort"] == "8":
|
||||
return "Richtig!"
|
||||
return "Leider falsch."
|
||||
return '<form method="post">Was ist 3 + 5? ' \
|
||||
'<input name="antwort"><button>OK</button></form>'
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0", port=9006) # 90 + Raumnummer
|
||||
Loading…
Reference in a new issue