Hi all,
In my project I am Django messages Framework. I am always facing 'str'
object error I dont understand how to solve this problem. Previously also I
face same issue. Now it is reproduced.
I am using django 4.0.4 version.
 Python 3.9.6
```
   messages.success(request, "Welcome back")
```
```
    {% if messages %}
    {% 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>&nbsp;&nbsp;&nbsp;
                <span class="conf_text text_post" style="color:red;">{{
message|safe }}&nbsp;&nbsp;</span>
                {% else %}
                <i style="color:#01ABAA;" class="fa fa-check-circle
circle_post " aria-hidden="true">&nbsp;</i>
                <span class = "conf_text"
style="color:#01ABAA;">&nbsp;&nbsp;&nbsp;{{ message|safe
}}</span>&nbsp;&nbsp;
                {% endif %}
            </div>
        </div>
    {% endfor %}
    {% endif %}
```

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMSz6bmF41eqWhxaXPG65TyDjNUzxfgYDxGSvSM9aiArfnxMMQ%40mail.gmail.com.

Reply via email to