Ejemplo n.º 1
0
def user_profile():
    form = UserProfileForm(obj=current_user)
    if form.validate_on_submit():
        form.update_user(current_user)
        flash('更新用户信息成功', 'success')
        return redirect(url_for('user.user_profile'))
    return render_template('profile.html', form=form)
Ejemplo n.º 2
0
def userprofile():
    user = current_user
    form = UserProfileForm(obj=current_user)
    if form.validate_on_submit():
        form.update_user(current_user)
        flash('个人信息更新成功', 'success')
        return redirect(url_for('user.home_page', user_id=user.id))
    return render_template('user/userprofile.html', form=form)
Ejemplo n.º 3
0
def profile():

    form = UserProfileForm(obj=current_user)
    if form.validate_on_submit():
        form.update_user(current_user)
        return redirect(url_for("user.profile"))

    return render_template("user/profile.html", form=form)