mails.py 文件源码

python
阅读 14 收藏 0 点赞 0 评论 0

项目:rudi 作者: lexxodus 项目源码 文件源码
def send_code(request, team):
    text_template = loader.get_template(
        "rudi/mails/code.txt")

    context = Context({
        "team": team,
        "link": request.build_absolute_uri(reverse(
            "rudi:confirm",
            args=(
                team.code,
            ),
        )),
    })
    subject = SUBJECT_CODE % (team.event.name, team.event.semester)
    if team.participant_2_email:
        recipients = [
            team.participant_1_email,
            team.participant_2_email
        ]
    else:
        recipients = [team.participant_1_email]
    with override(team.language):
        send_single(
            context,
            text_template,
            subject,
            team.event.advisor.email,
            recipients,
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号