making page stay on the same page when pressing button

This commit is contained in:
ishak jmilou.ishak
2024-10-23 14:56:39 +02:00
parent 76315649f7
commit 9d6816f210
2 changed files with 6 additions and 6 deletions

View File

@@ -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)