Пример #1
0
def approve(id):
    approval_user = Following.get((Following.follower_id == id)
                                  & (Following.idol_id == current_user.id))
    approval_user.approved = True
    approval_user.save()
    return redirect(
        url_for('users.show',
                username=current_user.name))  #user stays at his profile page
def accept(user_id):
    follow = Following.get(Following.id == user_id)
    follow.approved = True
    follow.save()
    return redirect(url_for("users.show", username=current_user.username))