I\'m creating a web app using Flask to deal with GoogleOpenID, these codes are almost finished, except the flashing message contains a link:
@oid.after_login
def
You need to render a template after calling flash()
which should then get the message using get_flashed_messages()
.
You need to adjust your code to call a template after calling flash(). flash sends the message to next request which can be extracted by the template. The template can look something like:
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
- {{ message | safe }}
{% endfor %}
{% endif %}
{% endwith %}
In your view code, I would add a render_template
right after the flash() call. Something like:
flash('success')
return render_template('whatever.html')