예제 #1
0
    def configure(self, config):

        self.startup = True

        # Setup harvest model
        model_setup()

        self.startup = False
예제 #2
0
    def configure(self, config):

        self.startup = True

        # Setup harvest model
        model_setup()

        self.startup = False
예제 #3
0
    def configure(self, config):

        self.startup = True

        # Setup harvest model
        model_setup()

        # Configure database logger
        _configure_db_logger(config)

        self.startup = False
예제 #4
0
    def configure(self, config):

        self.startup = True

        # Setup harvest model
        model_setup()
        
        # Configure database logger
        _configure_db_logger(config)

        self.startup = False
class Harvest(SingletonPlugin):

    implements(IConfigurable)
    implements(IRoutes, inherit=True)
    implements(IConfigurer, inherit=True)
    implements(IActions)
    implements(IAuthFunctions)

    def configure(self, config):

        auth_profile = config.get('ckan.harvest.auth.profile', None)

        if auth_profile:
            # Check if auth profile exists
            module_root = 'ckanext.harvest.logic.auth'
            module_path = '%s.%s' % (module_root, auth_profile)
            try:
                module = __import__(module_path)
            except ImportError, e:
                raise ImportError('Unknown auth profile: %s' % auth_profile)

            # If we are using the publisher auth profile, make sure CKAN core
            # also uses it.
            if auth_profile == 'publisher' and \
                not config.get('ckan.auth.profile','') == 'publisher':
                raise Exception(
                    'You must enable the "publisher" auth profile' +
                    ' in CKAN in order to use it on the harvest extension' +
                    ' (adding "ckan.auth.profile=publisher" to your ini file)')

        # Setup harvest model
        model_setup()
예제 #6
0
    def configure(self, config):

        # Setup harvest model
        model_setup()
예제 #7
0
파일: plugin.py 프로젝트: tbalaz/test
    def configure(self, config):

        # Setup harvest model
        model_setup()