Last active
November 1, 2017 11:42
-
-
Save chidindu-ogbonna/6b40fa07ec1e60dae01337b731217015 to your computer and use it in GitHub Desktop.
Flash messages in for Flask framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for message in get_flashed_messages() %} | |
<div class="alert alert-warning"> | |
<button type="button" class="close" data-dismiss="alert">×</button> | |
{{ message }} | |
</div> | |
{% endfor %} | |
<!-- Another template design for using flash messages --> | |
{% for message in get_flashed_messages() %} | |
<div class="alert alert-success"> | |
<div class="container-fluid"> | |
<div class="alert-icon"> | |
<i class="material-icons">check</i> | |
</div> | |
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
<span aria-hidden="true"><i class="material-icons">clear</i></span> | |
</button> | |
{{ message }} | |
</div> | |
</div> | |
{% endfor %} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment