#NEWLINE# @ route ( method = ( 'get' , 'options' ) ) #NEWLINE# def metadata( self , request ) : #NEWLINE# #INDENT# 'Model metadata\n        ' #NEWLINE# if ( request . method == 'OPTIONS' ) : #NEWLINE# #INDENT# request . app . fire ( 'on_preflight' , request ) #NEWLINE# return request . response #NEWLINE# #UNINDENT# backend = request . cache . auth_backend #NEWLINE# model = self . model #NEWLINE# if backend . has_permission ( request , model . name , 'read' ) : #NEWLINE# #INDENT# meta = model . meta ( request ) #NEWLINE# return Json ( meta ) . http_response ( request ) #NEWLINE# #UNINDENT# raise PermissionDenied