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,
)
评论列表
文章目录