From 3d5130d68dee15f7c4a011a3803c63b35ce9eef4 Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Mon, 2 Aug 2021 19:17:54 +0800 Subject: [PATCH] app/main.py: flash a message after deleting a word (use bootstrap alerts -- add additional content, e.g., a bolder congratulations). --- app/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 5af6819..44e2801 100644 --- a/app/main.py +++ b/app/main.py @@ -197,6 +197,7 @@ def get_flashed_messages_if_any(): s = '' for message in messages: s += '' return s @@ -326,7 +327,7 @@ def familiar(username,word): def deleteword(username,word): user_freq_record = path_prefix + 'static/frequency/' + 'frequency_%s.pickle' % (username) pickle_idea2.deleteRecord(user_freq_record,word) - flash(f'Congratulations! {word} is no longer in your word list.') + flash(f'{word} is no longer in your word list.') return redirect(url_for('userpage', username=username)) @app.route("/", methods=['GET', 'POST'])