Example #1
0
    def configure(self, config):

        self.startup = True

        # Setup harvest model
        model_setup()

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

        self.startup = True

        # Setup harvest model
        model_setup()

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

        self.startup = True

        # Setup harvest model
        model_setup()

        # Configure database logger
        _configure_db_logger(config)

        self.startup = False
    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()
Example #6
0
    def configure(self, config):

        # Setup harvest model
        model_setup()
Example #7
0
    def configure(self, config):

        # Setup harvest model
        model_setup()