17 lines
No EOL
393 B
Python
17 lines
No EOL
393 B
Python
from flask import *
|
|
|
|
app = Flask("Witze")
|
|
notes = []
|
|
|
|
@app.route("/")
|
|
def root():
|
|
return render_template("index.html")
|
|
|
|
@app.route("/note" ,methods=["POST","GET"])
|
|
def note():
|
|
if request.method == "POST":
|
|
notes.append(str(request.data)[3:-2])
|
|
print(f"Notiz hinzugefügt: {request.data}")
|
|
return ["juhuuuu"]
|
|
elif request.method == "GET":
|
|
return notes |