#NEWLINE# def is_authenticated( self , request ) : #NEWLINE# #INDENT# if ( ( request . method == 'GET' ) and ( 'GET' in self . method ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# method = getattr ( request , request . method ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# method = request . GET #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# ApiKey . objects . get ( user__username = method . get ( 'api_username' ) , key = method . get ( 'api_key' ) ) #NEWLINE# #UNINDENT# except ApiKey . DoesNotExist : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# return True