database.py 文件源码

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

项目:lainonlife 作者: barrucadu 项目源码 文件源码
def update_dj_info(username, form_dict):
    check_query = Query()
    check_if_user_exists = THE_DB.search(check_query.id == username)
    if len(check_if_user_exists) == 0:
        return False
    # trust no one, even if someone modified their response we don't want them to
    # most of these require different levels of permission
    dont_touch = ['admin', 'banned', 'id', 'password']
    for k in dont_touch:
        if k in form_dict:
            del form_dict[k]
    THE_DB.update(form_dict, check_query.id == username)
    return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号