added code 303 where POST requests are redirected to endpoints that accept only GET (which, weirdly enough, never was a problem for werk and text)
This commit is contained in:
parent
b0e332f9d2
commit
6c24af2be4
@ -19,7 +19,7 @@ def create():
|
||||
db.session.add(Sprache(Sprache = request.form["form_Sprache"]))
|
||||
db.session.commit()
|
||||
flash("Eintrag erfolgreich hinzugefügt")
|
||||
return redirect(url_for("sprache.all"))
|
||||
return redirect(url_for("sprache.all"), code=303)
|
||||
|
||||
@bp.route("/sprache/update/<int:id>", methods=["POST"])
|
||||
def update(id):
|
||||
@ -27,7 +27,7 @@ def update(id):
|
||||
sprache.Sprache = request.form["form_Sprache"]
|
||||
db.session.commit()
|
||||
flash("Eintrag erfolgreich geändert")
|
||||
return redirect(url_for("sprache.all"))
|
||||
return redirect(url_for("sprache.all"), code=303)
|
||||
|
||||
@bp.route("/sprache/delete/<int:id>")
|
||||
def delete(id):
|
||||
|
||||
@ -19,7 +19,7 @@ def create():
|
||||
db.session.add(Verlag(Verlag = request.form["form_Verlag"]))
|
||||
db.session.commit()
|
||||
flash("Eintrag erfolgreich hinzugefügt")
|
||||
return redirect(url_for("verlag.all"))
|
||||
return redirect(url_for("verlag.all"), code=303)
|
||||
|
||||
@bp.route("/verlag/update/<int:id>", methods=["POST"])
|
||||
def update(id):
|
||||
@ -27,7 +27,7 @@ def update(id):
|
||||
verlag.Verlag = request.form["form_Verlag"]
|
||||
db.session.commit()
|
||||
flash("Eintrag erfolgreich geändert")
|
||||
return redirect(url_for("verlag.all"))
|
||||
return redirect(url_for("verlag.all"), code=303)
|
||||
|
||||
@bp.route("/verlag/delete/<int:id>")
|
||||
def delete(id):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user