Пример #1
0
def render_ptoken_created(ptoken):
    params = {'ptoken': ptoken}

    response_html = premailer_transform(
        render_to_string("emails/ptoken_created.html", params))
    response_txt = render_to_string("emails/ptoken_created.txt", params)
    subject = _("🎉 Your new personal token is ready 🎉")

    return response_html, response_txt, subject
Пример #2
0
def render_ptoken_redemption_cancelled(ptoken, redeem):
    params = {'ptoken': ptoken, 'redeem': redeem}

    response_html = premailer_transform(
        render_to_string("emails/ptoken_redemption_cancelled.html", params))
    response_txt = render_to_string("emails/ptoken_redemption_cancelled.txt",
                                    params)
    subject = _("Redemption cancelled")

    return response_html, response_txt, subject
Пример #3
0
def render_ptoken_redemption_complete_for_owner(ptoken, redeem):
    params = {'ptoken': ptoken, 'redeem': redeem}

    response_html = premailer_transform(
        render_to_string("emails/ptoken_redemption_complete_for_owner.html",
                         params))
    response_txt = render_to_string(
        "emails/ptoken_redemption_complete_for_owner.txt", params)
    subject = _(f"🌈 Redemption complete for {redeem.reason}")

    return response_html, response_txt, subject