1
0
Fork 0

app/main.py: flash a message after deleting a word (use bootstrap alerts).

Lanhui-flash-messages
Hui Lan 2021-08-02 19:11:53 +08:00
parent 4773a6d131
commit 08bb7e0c40
1 changed files with 5 additions and 5 deletions

View File

@ -194,12 +194,12 @@ def get_answer_part(s):
def get_flashed_messages_if_any():
messages = get_flashed_messages()
if messages == []:
return ''
s = '<ul class=flashes>'
s = ''
for message in messages:
s += f'<li>{message}</li>'
return s + '</ul>'
s += '<div class="alert alert-warning" role="alert">'
s += f'{message}'
s += '</div>'
return s
@app.route("/<username>/reset", methods=['GET', 'POST'])