def resource_view_list(context, data_dict):
 model = context['model']
 id = _get_or_bust(data_dict, 'id')
 resource = model.Resource.get(id)
 if (not resource):
  raise NotFound
 context['resource'] = resource
 _check_access('resource_view_list', context, data_dict)
 q = model.Session.query(model.ResourceView).filter_by(resource_id=id)
 resource_views = [resource_view for resource_view in q.order_by(model.ResourceView.order).all() if datapreview.get_view_plugin(resource_view.view_type)]
 return model_dictize.resource_view_list_dictize(resource_views, context)

def resource_view_list ( context , data_dict ) : model = context [ 'model' ] id = _get_or_bust ( data_dict , 'id' ) resource = model . Resource . get ( id ) if ( not resource ) : raise NotFound context [ 'resource' ] = resource _check_access ( 'resource_view_list' , context , data_dict ) q = model . Session . query ( model . ResourceView ) . filter_by ( resource_id = id ) resource_views = [ resource_view for resource_view in q . order_by ( model . ResourceView . order ) . all ( ) if datapreview . get_view_plugin ( resource_view . view_type ) ] return model_dictize . resource_view_list_dictize ( resource_views , context )
return the list of resource views for a particular resource .