Skip to content
Snippets Groups Projects
Commit 5d04d269 authored by Tim Fechner's avatar Tim Fechner
Browse files

Add django messages display in base template

parent a03568e3
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,26 @@ ...@@ -42,6 +42,26 @@
{% block section %} {% block section %}
<section class="section" id="hshassets-single-section"> <section class="section" id="hshassets-single-section">
<div class="container"> <div class="container">
{% block notifications %} {# django message framework enabled? #}
{% if messages %}
{% for message in messages %}
<div class="notification
{% if message.tags == 'info' %}is-info
{% elif message.tags == 'success'%}is-success
{% elif message.tags == 'warning'%}is-warning
{% elif message.tags == 'error'%}is-danger{% endif %}">
<span class="icon">
{% if message.tags == 'debug' %}<i class="fa fa-bug"></i>
{% elif message.tags == 'info'%}<i class="fa fa-info"></i>
{% elif message.tags == 'success'%}<i class="fa fa-check"></i>
{% elif message.tags == 'warning'%}<i class="fa fa-exclamation-triangle"></i>
{% elif message.tags == 'error'%}<i class="fa fa-exclamation-triangle"></i>{% endif %}
</span>
{{ message }}
</div>
{% endfor %}
{% endif %}
{% endblock %}
{% block container %}{% endblock %} {% block container %}{% endblock %}
</div> </div>
</section> </section>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment