From https://docs.djangoproject.com/en/1.5/ref/contrib/messages/