https://docs.djangoproject.com/en/3.2/ref/contrib/messages/
In views.py :
{{{
messages.success(request, "Item is successfully removed.")
}}}
In template:
{{{
{% for message in messages %}
<div class = "conf_body">
<div class="alert alert-{% if message.tags == 'error'
%}danger{% else %}{{ message.tags }}{% endif %} success-alert flex-row">
<a class="close close_conf" href="#" data-dismiss="alert"
style="">×</a>
{% if message.tags == 'error' %}
<i style="color:red;" class="fa fa-exclamation-circle
circle_post"
aria-hidden="true"></i>
<span class = "conf_text" style="color:red;"
class="text_post">{{ message|safe }} </span>
{% else %}
<i style="color:#01ABAA;" class="fa fa-check-circle
circle_post " aria-hidden="true"> </i>
<span class = "conf_text"
style="color:#01ABAA;"> {{ message|safe
}}</span>
{% endif %}
</div>
</div>
{% endfor %}
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33116>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => needsinfo
Comment:
Thanks for the report, however I don't think you've explained the issue in
enough detail to confirm a bug in Django. Please reopen the ticket if you
can debug your issue and provide details (traceback or/and a sample
project) about why and where Django is at fault. If you're having trouble
understanding how Django works, see
TicketClosingReasons/UseSupportChannels for ways to get help.
--
Ticket URL: <https://code.djangoproject.com/ticket/33116#comment:1>