示例#1
0
文件: views.py 项目: Fe0fan0v/Notes
def change_password():

    form = ChangePasswordForm()
    if form.validate_on_submit():
        password = request.form['password']
        functions.edit_password(password, session['id'])
        return redirect('/profile/settings/')
    return render_template('change_password.html', form=form, username=session['username'])
示例#2
0
def change_password():
    '''
        App for changing the password of a user
    '''
    form = ChangePasswordForm()
    if form.validate_on_submit():
        password = request.form['password']
        functions.edit_password(password, session['id'])
        return redirect('/homepage')
    return render_template('change_password.html', form=form, username=session['username'])