diff --git a/examples/tutorial/flaskr/blog.py b/examples/tutorial/flaskr/blog.py index be0d92c435..838cd87d33 100644 --- a/examples/tutorial/flaskr/blog.py +++ b/examples/tutorial/flaskr/blog.py @@ -78,6 +78,7 @@ def create(): (title, body, g.user["id"]), ) db.commit() + flash("Post created successfully!", "success") return redirect(url_for("blog.index")) return render_template("blog/create.html") @@ -105,6 +106,7 @@ def update(id): "UPDATE post SET title = ?, body = ? WHERE id = ?", (title, body, id) ) db.commit() + flash("Post updated successfully!", "success") return redirect(url_for("blog.index")) return render_template("blog/update.html", post=post) @@ -122,4 +124,5 @@ def delete(id): db = get_db() db.execute("DELETE FROM post WHERE id = ?", (id,)) db.commit() + flash("Post deleted successfully!", "success") return redirect(url_for("blog.index")) diff --git a/notes.txt b/notes.txt new file mode 100644 index 0000000000..3a14cd5160 --- /dev/null +++ b/notes.txt @@ -0,0 +1,2 @@ +My personal notes for the Flask project +This new line is only on my feature branch.