﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
18658	Better support for exceptions / error messages in custom admin actions	Danilo Bargen	thiderman	"The docs don't mention any way to create error messages in custom admin actions. According to [http://stackoverflow.com/questions/3241659/custom-error-message-in-django-admin-actions/5622515 an answer on Stackoverflow], this can be achieved with:

{{{
from django.contrib import messages

# Then, when you need to error the user:
messages.error(request, ""The message"")
}}}

There are three issues with this:
- There's a `message_user` method on a ModelAdmin, but no similar thing for errors. This seems inconsistent.
- It's not mentioned in the docs. Errors in actions need to be handled.
- The error message isn't rendered with red background color, as it should be. A possible fix is described [http://stackoverflow.com/a/5622515/284318 here]."	Cleanup/optimization	closed	contrib.admin	1.4	Normal	fixed	admin, exception handling, ui/ux, docs		Ready for checkin	1	0	0	0	1	0
