diff --git a/src/Python/flask/web/app.py b/src/Python/flask/web/app.py index 057a902..fef83d8 100644 --- a/src/Python/flask/web/app.py +++ b/src/Python/flask/web/app.py @@ -1,4 +1,4 @@ -from flask import Flask, request, render_template +from flask import Flask, request, render_template, redirect import paho.mqtt.client as mqtt app = Flask(__name__) @@ -21,7 +21,7 @@ def move(): print("Bericht succesvol gepubliceerd") else: print("Fout bij het publiceren van bericht") - return "Bericht verzonden!" + return redirect('/') if __name__ == '__main__': app.run(debug=True) diff --git a/src/Python/flask/web/templates/index.html b/src/Python/flask/web/templates/index.html index 0ab2680..434dfa1 100644 --- a/src/Python/flask/web/templates/index.html +++ b/src/Python/flask/web/templates/index.html @@ -5,10 +5,10 @@