def is_list_view(path, method, view):
 if hasattr(view, 'action'):
  return (view.action == 'list')
 if (method.lower() != 'get'):
  return False
 path_components = path.strip('/').split('/')
 if (path_components and ('{' in path_components[(-1)])):
  return False
 return True

def is_list_view ( path , method , view ) : if hasattr ( view , 'action' ) : return ( view . action == 'list' ) if ( method . lower ( ) != 'get' ) : return False path_components = path . strip ( '/' ) . split ( '/' ) if ( path_components and ( '{' in path_components [ ( - 1 ) ] ) ) : return False return True
return true if the given path/method appears to represent a list view .