We can message the user by calling

self.message_user(
    request,
    “This is a waaarning...",
    messages.WARNING,
)

form within a ModelAdmin. This works for success level (default green message), 
warning level and error level. I was also expecting it to support “info” level 
with a blue style, but it is simply not implemented and defaults to green 
“success” level. Any reason why not?

Seems to need only 4 lines of CSS and maybe an icon, like the other styles: 
https://github.com/django/django/blob/77d335e5abec889b15323975187a8d5b10bfcb0f/django/contrib/admin/static/admin/css/base.css#L561-L569


-- 
Fran

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/4B55CE16-7E89-4BBD-969A-F60A3556FC6A%40gmail.com.

Reply via email to