views.py 文件源码

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

项目:MoegirlUpdater 作者: kafuuchino 项目源码 文件源码
def edit_profile():
    form=EditProfileForm()
    u=User()
    if request.method == 'POST' and form.validate():
        pwd=u.GetPassword(g.user)
        if u.verify_password(form.oripassword.data):
            email=form.email.data
            aboutme=form.about_me.data
            if form.password.data is not u'':
                u.ChangePassword(g.user,form.password.data)
            u.ChangeProfile(g.user,email,aboutme)
            flash('??????')
            return redirect(url_for('.user',username=g.user))
        else:
            flash('????????')
    u.GetUserInfo(g.user)
    form.email.data=u.email
    form.about_me.data=u.aboutme
    return render_template('edit_profile.html',form=form,u=u)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号