1

In my django admin, error messages (using the messages framework) are created with danger class. However the message looks green with an approval sign over it:

enter image description here

When looking into admin/css/base.css, it looks like the error class is error and not danger.

Why does it show as danger? How can I change it?

iTayb
  • 12,373
  • 24
  • 81
  • 135

1 Answers1

3

There is no message level called danger. What you could use is either warning or error:

https://docs.djangoproject.com/en/1.11/ref/contrib/messages/#message-levels

DEBUG   Development-related messages that will be ignored (or removed) 
        in a production deployment
INFO    Informational messages for the user
SUCCESS An action was successful, e.g. “Your profile was updated successfully”
WARNING A failure did not occur but may be imminent
ERROR   An action was not successful or some other failure occurred
Selcuk
  • 57,004
  • 12
  • 102
  • 110