Пример #1
0
def show_change_password(album):
    if request.method == "POST":
        show = Show(album, current_app.config, session)
        username = request.form["username"]
        password = request.form["password"]
        show.set_user(username, current_app.config["SECRET_KEY"], password).save()
        return goback(True)
Пример #2
0
def show_change_password(album):
    if request.method == 'POST':
        show = Show(album, current_app.config, session)
        username = request.form['username']
        password = request.form['password']
        show.set_user(username, current_app.config['SECRET_KEY'], password).save()
        return goback(True)
Пример #3
0
def show_change_password(album):
    if request.method == 'POST':
        show = Show(album)
        username = request.form['username']
        password = request.form['password']
        show.set_user(username, current_app.config['SECRET_KEY'], password)
        if (show.save()):
            return redirect(request.referrer or url_for('.index'))
        else:
            return jsonify(result='Failed')