mdulchevskiy
mdulchevskiy

Reputation: 3

Django messages: how can i change message text in html?

View:

messages.add_message(request, messages.ERROR, 'Cells marked incorrectly.')

HTML:

{% if messages %}
    <ul class="messages">
        {% for message in messages %}
                <li class="{{ message.tags }}">
                {{ message }}
            </li>
        {% endfor %}
    </ul>
{% endif %}

Problem: I need to remove marker which you can see on the related picture. I read so many documentation and forums and find nothing. Maby somebody faces this problem and can help me.

Upvotes: 0

Views: 761

Answers (1)

Ansuman
Ansuman

Reputation: 398

consider a simple html, beacause django template engine in the end gives you something like this:

 <ul class="messages-no-bullets">
         <li class="{{ message.tags }}">
            Test1
        </li>
        <li class="{{ message.tags }}">
            Test2
        </li>
    </ul>

so using CSS you can do this:

.messages-no-bullets li{
  list-style-type: none;
}

Upvotes: 1

Related Questions