@app.route('/<username>/unfollow')
def unfollow_user(username):
 if (not g.user):
  abort(401)
 whom_id = get_user_id(username)
 if (whom_id is None):
  abort(404)
 db = get_db()
 db.execute('delete from follower where who_id=? and whom_id=?', [session['user_id'], whom_id])
 db.commit()
 flash(('You are no longer following "%s"' % username))
 return redirect(url_for('user_timeline', username=username))

@ app . route ( '/<username>/unfollow' ) def unfollow_user ( username ) : if ( not g . user ) : abort ( 401 ) whom_id = get_user_id ( username ) if ( whom_id is None ) : abort ( 404 ) db = get_db ( ) db . execute ( 'delete from follower where who_id=? and whom_id=?' , [ session [ 'user_id' ] , whom_id ] ) db . commit ( ) flash ( ( 'You are no longer following "%s"' % username ) ) return redirect ( url_for ( 'user_timeline' , username = username ) )
removes the current user as follower of the given user .