#16884: Add message level argument to ModelAdmin's message_user
-------------------------------+------------------------------------
     Reporter:  shelldweller   |                    Owner:  nobody
         Type:  New feature    |                   Status:  new
    Component:  contrib.admin  |                  Version:  master
     Severity:  Normal         |               Resolution:
     Keywords:  admin          |             Triage Stage:  Accepted
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  1              |                    UI/UX:  1
-------------------------------+------------------------------------

Comment (by claudep):

 Replying to [comment:11 sbaechler]:
 > If you have to import messages anyway now, isn't it easier to just use
 messages.error(request, 'foo') instead of self.message_user(request,
 'foo', level=messages.ERROR) ?
 > Especially since message_user doesn't seem to do anything but call
 messages.info().

 Fair, I admit that the message_user benefit is small. It avoids importing
 the contrib.messages when you use the default level.

 So a proposal would be to simply deprecate the method and suggest using
 the contrib.messages API directly. Other opinions?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16884#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to