Add proper email notifications
This commit is contained in:
@@ -44,6 +44,26 @@
|
||||
</nav>
|
||||
|
||||
<main class="mx-auto max-w-6xl px-4 py-8">
|
||||
{% if messages %}
|
||||
{% comment %}
|
||||
One styled card per Django messages.add_message() call. The text is
|
||||
rendered via {{ message|safe }} so that callers that built their
|
||||
string with django.utils.html.format_html() can include <a>/<strong>
|
||||
markup (variables are auto-escaped by format_html).
|
||||
{% endcomment %}
|
||||
<div class="mb-6 space-y-2">
|
||||
{% for message in messages %}
|
||||
<div class="px-4 py-3 rounded-md border text-sm
|
||||
{% if 'success' in message.tags %}border-emerald-200 bg-emerald-50 text-emerald-900
|
||||
{% elif 'error' in message.tags %}border-red-200 bg-red-50 text-red-900
|
||||
{% elif 'warning' in message.tags %}border-amber-200 bg-amber-50 text-amber-900
|
||||
{% else %}border-slate-200 bg-slate-50 text-slate-700{% endif %}">
|
||||
{{ message|safe }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user