__init__.py 文件源码

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

项目:akamatsu 作者: rmed 项目源码 文件源码
def _do_on_login(sender, user, **extra):
    """Notify the user of a new login.

    This is only done if the ``notify_login`` attribute is set to ``True``.
    """
    if user.notify_login:
        notification = Message(
            'akamatsu - New session started',
            recipients=[user.email],
            body=render_template('mail/login.txt', user=user),
            html=render_template('mail/login.html', user=user)
        )

        mail.send(notification)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号