otherwise html_message is None. call the method mail.mail_admins with 5 arguments: subject, message, fail_silently as boolean True, tml_message as html_message,
mail . mail_admins ( subject , message , fail_silently = True , html_message = html_message , connection = self . connection ( ) )