{%- macro flashed_messages() -%}
  {%- block messages %}
    {%- for category, msg in get_flashed_messages(with_categories=True) %}
      {%- set category = 'info' if category not in ['info', 'danger', 'warning', 'success'] else category %}
      <div class="alert alert-{{ category }}">
        <div class="container">
          <a class="close" data-dismiss="alert" href="#">&times;</a>
            {{ msg }}
        </div>
      </div>
    {%- endfor %}
  {%- endblock messages %}
{%- endmacro %}
