Opened 3 years ago

Closed 3 years ago

#20111 closed Cleanup/optimization (fixed)

Admin message levels are too ambigious

Reported by: darklow Owned by: darklow
Component: contrib.admin Version: 1.5
Severity: Normal Keywords: messages
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Currently admin uses messages.INFO level for both - info messages and success messages.
But even text states it should be messages.SUCCESS instead of messages.INFO:
"The %(name)s "%(obj)s" was added successfully"

Therefore it is impossible to use different styles for these levels.

One more example:
In changelist, if you don't choose any checkbox and use some action, you receive message:
"Items must be selected in order to perform actions on them..."
which looks exactly like success messages and gives us feeling everything went ok, but it wasn't and this is confusing.

I suggest to correct these message levels, so that they are more precise and we could style them separately.
Patch is on it's way.

Attachments (2)

messages_level_old.png (3.2 KB) - added by darklow 3 years ago.
messages_level_new.png (3.1 KB) - added by darklow 3 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 3 years ago by darklow

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to darklow
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 3 years ago by darklow

Patch is available on my github branch. Opened PR.
See diff:

Changed 3 years ago by darklow

Changed 3 years ago by darklow

comment:3 Changed 3 years ago by darklow

Since success and info message style are identical in admin, only noticable changes for users in current admin version will be warning messages.

I think this is more appropriate and precise:

Than current version:

comment:4 Changed 3 years ago by claudep

  • Triage Stage changed from Unreviewed to Accepted

comment:5 Changed 3 years ago by darklow

comment:6 Changed 3 years ago by twoolie

  • Triage Stage changed from Accepted to Ready for checkin

I've looked over the patch. It's simple and solid. No tests/docs needed.

Marking Ready For Checkin as per

comment:7 Changed 3 years ago by Kaspars Sprogis <darklow@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 3be368c73e8e6696e7cc74421aeb4d06d8e828c8:

Fix #20111 Added more precise message level for succcess and warning messages

Note: See TracTickets for help on using tickets.
Back to Top