{# Copyright (c) 2015 Chintalagiri Shashank Released under the MIT license #} {% macro render_error(error, level) -%}
{{ error.headline }}
{{ error.detail }}
{% endmacro %} {% macro render_error_list(errors_by_type, level) -%} {% endmacro %} {% macro render_validation_errors(validation_errors) -%}
{% if validation_errors.nerrors %}
Errors
{{ render_error_list(validation_errors.errors_by_type, 'alert') }} {% endif %} {% if validation_errors.nwarnings %}
Warnings
{{ render_error_list(validation_errors.warnings_by_type, 'warning') }} {% endif %}
{% endmacro %}