예제 #1
0
def password():
    form = PasswordForm()

    if form.validate_on_submit():
        form.populate_obj(user)
        user.password = form.new_password.data

        db.session.commit()

        flash('Password updated.', 'success')

    return render_template('user/password.html', form=form)
예제 #2
0
파일: views.py 프로젝트: LoyiLY/fbone
def password():
    form = PasswordForm()

    if form.validate_on_submit():
        form.populate_obj(user)
        user.password = form.new_password.data

        db.session.commit()

        flash('Password updated.', 'success')

    return render_template('user/password.html', form=form)