2021-03-13 02:19:42 -07:00
|
|
|
<div
|
|
|
|
id="django-messages"
|
|
|
|
class="toast-container position-fixed bottom-0 end-0 m-3"
|
|
|
|
>
|
|
|
|
{% if messages %} {% for message in messages %}
|
|
|
|
<div
|
|
|
|
class="django-message toast align-items-center border-0 bg-{% if message.tags %}{{ message.tags }}{% else %}info{% endif %}"
|
|
|
|
role="alert"
|
|
|
|
aria-live="assertive"
|
|
|
|
aria-atomic="true"
|
2021-04-22 15:59:16 -07:00
|
|
|
data-bs-delay="10000"
|
2021-03-13 02:19:42 -07:00
|
|
|
>
|
|
|
|
<div class="d-flex">
|
|
|
|
<div class="toast-body">
|
|
|
|
{{ message }}
|
|
|
|
</div>
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="btn-close me-2 m-auto"
|
|
|
|
data-bs-dismiss="toast"
|
|
|
|
aria-label="Close"
|
|
|
|
></button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-04-22 15:59:16 -07:00
|
|
|
{% endfor %}
|
|
|
|
{% elif form and form.non_field_errors %}
|
|
|
|
{% for error in form.non_field_errors.get_json_data %}
|
|
|
|
<div
|
|
|
|
class="django-message toast align-items-center border-0 bg-danger"
|
|
|
|
role="alert"
|
|
|
|
aria-live="assertive"
|
|
|
|
aria-atomic="true"
|
|
|
|
data-bs-delay="10000"
|
|
|
|
>
|
|
|
|
<div class="d-flex">
|
|
|
|
<div class="toast-body">
|
|
|
|
{{ error.message }}
|
|
|
|
</div>
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="btn-close me-2 m-auto"
|
|
|
|
data-bs-dismiss="toast"
|
|
|
|
aria-label="Close"
|
|
|
|
></button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2021-03-13 02:19:42 -07:00
|
|
|
</div>
|