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