app/main.py: flash a message after deleting a word (use bootstrap alerts).
parent
4773a6d131
commit
08bb7e0c40
10
app/main.py
10
app/main.py
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue