app/main.py: flash a message after deleting a word from the new word list (fix error - import get_flashed_messages).

Lanhui-flash-messages
Hui Lan 2021-08-02 17:10:05 +08:00
parent f5086732f3
commit 8abbf458a2
1 changed files with 2 additions and 2 deletions

View File

@ -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 += '<title>EnglishPal Study Room for %s</title>' % (username)
page += '<div class="container-fluid">'
page += '<p><b>English Pal for <font color="red">%s</font></b> <a class="btn btn-secondary" href="/logout" role="button">登出</a></p>' % (username)
#page += get_flashed_messages_if_any()
page += get_flashed_messages_if_any()
page += '<p><b>阅读文章并回答问题</b></p>\n'
page += '<p><a class="btn btn-success" href="/%s/reset" role="button"> 下一篇 Next Article </a></p>' % (username)
page += '<div id="text-content">%s</div>' % (get_today_article(user_freq_record, session['articleID']))