'Returns the entire HTML snippet for the message.
Classes that extend this base class can override the message styling
by implementing their own version of this function. Messages that do
not use a title can just pass the body_html.'

@classmethod
def get_message_html(self, body_html, title=None):

    if title:
        return Text(_('{header_open}{title}{header_close}{body}')).format(header_open=HTML('<div    class="message-header">'), title=title, body=body_html, header_close=HTML('</div>'))
    return body_html
