

def _render_part(self, part, lang=None):
    'Render a mail part against the mail context.\n\n        Part can be:\n\n          * subject.txt\n          * body.txt\n          * body.html\n\n        '
    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(rendered.context)
    finally:
        translation.activate(cur_lang)
    return rendered.strip()

dataset/ETHPy150Open novafloss/django-mail-factory/mail_factory/mails.py BaseMail._render_part/VarMisuse@65/132 `self`->`rendered`