The message_user function used within the admin simply uses the contrib.messages package. You could try something like this:
from django.contrib import messages
# Then, when you need to error the user:
messages.error(request, "The message")
You can also use warning, debug, info and success in place of error
Hope that helps!