'Convenience method for setting the \'message\' and \'message_type\'
element of the template context.'

def set_message(self, message, type=None):

    self.template_context['message'] = message
    if type:
        self.template_context['status'] = type
