forked from mrlan/EnglishPal
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():
|
def get_flashed_messages_if_any():
|
||||||
messages = get_flashed_messages()
|
messages = get_flashed_messages()
|
||||||
if messages == []:
|
s = ''
|
||||||
return ''
|
|
||||||
s = '<ul class=flashes>'
|
|
||||||
for message in messages:
|
for message in messages:
|
||||||
s += f'<li>{message}</li>'
|
s += '<div class="alert alert-warning" role="alert">'
|
||||||
return s + '</ul>'
|
s += f'{message}'
|
||||||
|
s += '</div>'
|
||||||
|
return s
|
||||||
|
|
||||||
|
|
||||||
@app.route("/<username>/reset", methods=['GET', 'POST'])
|
@app.route("/<username>/reset", methods=['GET', 'POST'])
|
||||||
|
|
Loading…
Reference in New Issue