#NEWLINE# @ login_required #NEWLINE# def session_list( request ) : #NEWLINE# #INDENT# url = ( '%s/session/' % ( settings . API_BASE_URL , ) ) #NEWLINE# headers = { #NEWLINE# #INDENT# 'X-Auth-Token' : request . user . password , #NEWLINE# #UNINDENT# } #NEWLINE# r = requests . get ( url , headers = headers ) #NEWLINE# if ( r . status_code != requests . codes . ok ) : #NEWLINE# #INDENT# return signout ( request ) #NEWLINE# #UNINDENT# sessions = json . loads ( sessions . text ) #NEWLINE# return render ( request , 'sessions/session_list.html' , sessions )