def get_allowed_view_plugins(data_dict):
 can_view = []
 for plugin in p.PluginImplementations(p.IResourceView):
  plugin_info = plugin.info()
  if (plugin_info.get('always_available', False) or plugin.can_view(data_dict)):
   can_view.append(plugin)
 return can_view

def get_allowed_view_plugins ( data_dict ) : can_view = [ ] for plugin in p . PluginImplementations ( p . IResourceView ) : plugin_info = plugin . info ( ) if ( plugin_info . get ( 'always_available' , False ) or plugin . can_view ( data_dict ) ) : can_view . append ( plugin ) return can_view
returns a list of view plugins that work against the resource provided the data_dict contains: resource and package .