[enh] display errors

also tried flask's flash feature but flask creates session cookies if it
isn't flushed. Avoiding session cookies to preserve privacy
This commit is contained in:
Adam Tauber 2016-11-14 22:07:23 +01:00
parent 88dfee858e
commit 832cf37a97
2 changed files with 25 additions and 6 deletions

View file

@ -1,3 +1,4 @@
{% from 'oscar/macros.html' import icon %}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"{% if rtl %} dir="rtl"{% endif %}>
<head>
@ -54,6 +55,20 @@
<body>
{% include 'oscar/navbar.html' %}
<div class="container">
{% if errors %}
<div class="alert alert-danger fade in" role="alert">
<button class="close" data-dismiss="alert" type="button">
<span aria-hidden="true">×</span>
<span class="sr-only">{{ _('Close') }}</span>
</button>
<strong class="lead">{{ icon('info-sign') }} {{ _('Error!') }}</strong>
<ul>
{% for message in errors %}
<li>{{ message }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% block site_alert_error %}
{% endblock %}