def get_default_view_plugins(get_datastore_views=False):
 if (config.get('ckan.views.default_views') is None):
  default_view_types = DEFAULT_RESOURCE_VIEW_TYPES
 else:
  default_view_types = config.get('ckan.views.default_views').split()
 default_view_plugins = []
 for view_type in default_view_types:
  view_plugin = get_view_plugin(view_type)
  if (not view_plugin):
   log.warn('Plugin for view {0} could not be found'.format(view_type))
   continue
  info = view_plugin.info()
  plugin_requires_datastore = info.get('requires_datastore', False)
  if (plugin_requires_datastore == get_datastore_views):
   default_view_plugins.append(view_plugin)
 return default_view_plugins

def get_default_view_plugins ( get_datastore_views = False ) : if ( config . get ( 'ckan.views.default_views' ) is None ) : default_view_types = DEFAULT_RESOURCE_VIEW_TYPES else : default_view_types = config . get ( 'ckan.views.default_views' ) . split ( ) default_view_plugins = [ ] for view_type in default_view_types : view_plugin = get_view_plugin ( view_type ) if ( not view_plugin ) : log . warn ( 'Plugin for view {0} could not be found' . format ( view_type ) ) continue info = view_plugin . info ( ) plugin_requires_datastore = info . get ( 'requires_datastore' , False ) if ( plugin_requires_datastore == get_datastore_views ) : default_view_plugins . append ( view_plugin ) return default_view_plugins
returns the list of view plugins to be created by default on new resources the default view types are defined via the ckan .