def _render_part(self, part, lang=None):
        tpl = select_template(self.get_template_part(part, lang=lang))
        cur_lang = translation.get_language()
        try:
            translation.activate(lang or self.lang)
            rendered = tpl.render(self.context)
        finally:
            translation.activate(cur_lang)
        return rendered.strip()
Render a mail part against the mail context.
dataset/ETHPy150Open novafloss/django-mail-factory/mail_factory/mails.py/BaseMail._render_part