def sent():
link_id = request.args.get('link_id', None)
recipients_str = request.args.get('recipients', None)
message = request.args.get('message', None)
if not link_id or not recipients_str or not message:
return redirect(url_for('home'))
recipients = sanitize_recipients(recipients_str)
loved = [
Employee.get_key_for_username(recipient).get()
for recipient in recipients
]
return render_template(
'sent.html',
current_time=datetime.utcnow(),
current_user=Employee.get_current_employee(),
message=message,
loved=loved,
url='{0}l/{1}'.format(config.APP_BASE_URL, link_id),
)
评论列表
文章目录