{% for message in messages %}
  <div class="message ui-widget">
  {% if message.tags == "info" %}
    <div class="ui-state-highlight ui-corner-all">
      <span class="close ui-icon ui-icon-circle-close"></span>
      <p>
        <span class="ui-icon ui-icon-info"></span>
        {{ message }}
      </p>
    </div>
  {% endif %}
  {% if message.tags == "warning" %}
    <div class="ui-state-highlight ui-corner-all" >
      <span class="close ui-icon ui-icon-circle-close"></span>
      <p>
        <span class="ui-icon ui-icon-alert"></span>
        {{ message }}
      </p>
    </div>
  {% endif %}
  {% if message.tags == "success" %}
    <div class="ui-state-highlight ui-corner-all success" >
     <span class="close ui-icon ui-icon-circle-close"></span>
     <p>
        <span class="ui-icon ui-icon-check"></span>
        {{ message }}
      </p>
    </div>
  {% endif %}
  {% if message.tags == "error" %}
    <div class="ui-state-error ui-corner-all" >
      <span class="close ui-icon ui-icon-circle-close"></span>
      <p>
        <span class="ui-icon ui-icon-alert"></span>
        {{ message }}
      </p>
    </div>
  {% endif %}
  </div>
{% endfor %}

