app.py 文件源码

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

项目:chat_api 作者: hriks 项目源码 文件源码
def logout():
    user = User.query.filter_by(username=str(current_user.username)).first()

    user.is_active = False
    db.session.commit()
    session.clear()
    # Clear's chatBox session,
    # this closes the chatBOX

    hriks(
        'Notification: %s Successfully Logged out' % (
            current_user.username
        )
    )

    logout_user()
    # logout_user() is called which will
    # Logout user
    return redirect(url_for('index'))


# When ever this method is chat box will be closed
# and token for the group/user chatting will be
# dropped.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号