Beispiel #1
0
def account_settings():
    form = ChangePasswordForm(user=current_user)
    if form.validate_on_submit():
        current_user.set_password(form.new_password.data)
        db.session.commit()
        flash("Your password is successfully changed.", 'success')
        return redirect(url_for('.home'))
    return render_template('users/settings.html', form=form)
Beispiel #2
0
def account_settings():
    form = ChangePasswordForm(user=current_user)
    if form.validate_on_submit():
        current_user.set_password(form.new_password.data)
        db.session.commit()
        flash("Your password is successfully changed.", 'success')
        return redirect(url_for('home'))
    return render_template('users/settings.html', form=form)