From 8abbf458a2788f8220ce3201481823f6a90e5641 Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Mon, 2 Aug 2021 17:10:05 +0800 Subject: [PATCH] app/main.py: flash a message after deleting a word from the new word list (fix error - import get_flashed_messages). --- app/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index bc0be1b..ac49b5d 100644 --- a/app/main.py +++ b/app/main.py @@ -13,7 +13,7 @@ import pickle_idea, pickle_idea2 import os import random, glob from datetime import datetime -from flask import Flask, request, redirect, render_template, url_for, session, abort, flash +from flask import Flask, request, redirect, render_template, url_for, session, abort, flash, get_flashed_messages from difficulty import get_difficulty_level, text_difficulty_level, user_difficulty_level app = Flask(__name__) @@ -369,7 +369,7 @@ def userpage(username): page += 'EnglishPal Study Room for %s' % (username) page += '
' page += '

English Pal for %s 登出

' % (username) - #page += get_flashed_messages_if_any() + page += get_flashed_messages_if_any() page += '

阅读文章并回答问题

\n' page += '

下一篇 Next Article

' % (username) page += '
%s
' % (get_today_article(user_freq_record, session['articleID']))