#NEWLINE# @ blueprint . route ( '/login' , methods = [ 'POST' ] ) #NEWLINE# @ api_wrapper #NEWLINE# def login_hook( ) : #NEWLINE# #INDENT# username = request . form . get ( 'username' ) #NEWLINE# password = request . form . get ( 'password' ) #NEWLINE# api . auth . login ( username , password ) #NEWLINE# return WebSuccess ( message = ( 'Successfully logged in as ' + username ) , data = { #NEWLINE# #INDENT# 'teacher' : api . user . is_teacher ( ) , #NEWLINE# #UNINDENT# } )