ckan/lib/cli.py
def _get_view_plugins(self, view_plugin_types,
                          get_datastore_views=False):
        '''
        Returns the view plugins that were succesfully loaded

        Views are provided as a list of ``view_plugin_types``. If no types are
        provided, the default views defined in the ``ckan.views.default_views``
        will be created. Only in this case (when the default view plugins are
        used) the `get_datastore_views` parameter can be used to get also view
        plugins that require data to be in the DataStore.

        If any of the provided plugins could not be loaded (eg it was not added
        to `ckan.plugins`) the command will stop.

        Returns a list of loaded plugin names.
        '''
        from ckan.lib.datapreview import (get_view_plugins,
                                          get_default_view_plugins
                                          )

        log = logging.getLogger(__name__)

        view_plugins = []

        if not view_plugin_types:
            log.info('No view types provided, using default types')
            view_plugins = get_default_view_plugins()
            if get_datastore_views:
                view_plugins.extend(
                    get_default_view_plugins(get_datastore_views=True))
        else:
            view_plugins = get_view_plugins(view_plugin_types)

        loaded_view_plugins = [view_plugin.info()['name']
                               for view_plugin in view_plugins]

        plugins_not_found = list(set(view_plugin_types) -
                                 set(loaded_view_plugins))

        if plugins_not_found:
            error('View plugin(s) not found : {0}. '.format(plugins_not_found)
                  + 'Have they been added to the `ckan.plugins` configuration'
                  + ' option?')

        return loaded_view_plugins

        Returns the view plugins that were succesfully loaded

        Views are provided as a list of ``view_plugin_types``. If no types are
        provided, the default views defined in the ``ckan.views.default_views``
        will be created. Only in this case (when the default view plugins are
        used) the `get_datastore_views` parameter can be used to get also view
        plugins that require data to be in the DataStore.

        If any of the provided plugins could not be loaded (eg it was not added
        to `ckan.plugins`) the command will stop.

        Returns a list of loaded plugin names.
        
Returns the view plugins that were succesfully loaded
Views are provided as a list of ``view_plugin_types``. If no types are
provided, the default views defined in the ``ckan.views.default_views``
will be created. Only in this case (when the default view plugins are
used) the `get_datastore_views` parameter can be used to get also view
plugins that require data to be in the DataStore.

If any of the provided plugins could not be loaded  the command will stop.

Returns a list of loaded plugin names.
Returns the view plugins that were succesfully loaded Views are provided as a list of ` ` view_plugin_types ` ` . If no types are provided the default views defined in the ` ` ckan . views . default_views ` ` will be created . Only in this case ( when the default view plugins are used ) the ` get_datastore_views ` parameter can be used to get also view plugins that require data to be in the DataStore . If any of the provided plugins could not be loaded the command will stop . Returns a list of loaded plugin names .
def _get_view_plugins(self, view_plugin_types,
                          get_datastore_views=False):
        from ckan.lib.datapreview import (get_view_plugins,
                                          get_default_view_plugins
                                          )
        log = logging.getLogger(__name__)
        view_plugins = []
        if not view_plugin_types:
            log.info('No view types provided, using default types')
            view_plugins = get_default_view_plugins()
            if get_datastore_views:
                view_plugins.extend(
                    get_default_view_plugins(get_datastore_views=True))
        else:
            view_plugins = get_view_plugins(view_plugin_types)
        loaded_view_plugins = [view_plugin.info()['name']
                               for view_plugin in view_plugins]
        plugins_not_found = list(set(view_plugin_types) -
                                 set(loaded_view_plugins))
        if plugins_not_found:
            error('View plugin(s) not found : {0}. '.format(plugins_not_found)
                  + 'Have they been added to the `ckan.plugins` configuration'
                  + ' option?')
        return loaded_view_plugins
def _get_view_plugins ( self , view_plugin_types , get_datastore_views = False ) : from ckan . lib . datapreview import ( get_view_plugins , get_default_view_plugins ) log = logging . getLogger ( __name__ ) view_plugins = [ ] if not view_plugin_types : log . info ( 'No view types provided, using default types' ) view_plugins = get_default_view_plugins ( ) if get_datastore_views : view_plugins . extend ( get_default_view_plugins ( get_datastore_views = True ) ) else : view_plugins = get_view_plugins ( view_plugin_types ) loaded_view_plugins = [ view_plugin . info ( ) [ 'name' ] for view_plugin in view_plugins ] plugins_not_found = list ( set ( view_plugin_types ) - set ( loaded_view_plugins ) ) if plugins_not_found : error ( 'View plugin(s) not found : {0}. ' . format ( plugins_not_found ) + 'Have they been added to the `ckan.plugins` configuration' + ' option?' ) return loaded_view_plugins
Returns the view plugins that were succesfully loaded
Views are provided as a list of ``view_plugin_types``.
Returns the view plugins that were succesfully loaded Views are provided as a list of ` ` view_plugin_types ` ` .
'''
        Returns the view plugins that were succesfully loaded

        Views are provided as a list of ``view_plugin_types``. If no types are
        provided, the default views defined in the ``ckan.views.default_views``
        will be created. Only in this case (when the default view plugins are
        used) the `get_datastore_views` parameter can be used to get also view
        plugins that require data to be in the DataStore.

        If any of the provided plugins could not be loaded (eg it was not added
        to `ckan.plugins`) the command will stop.

        Returns a list of loaded plugin names.
        '''
self
view_plugin_types
get_datastore_views