def update_config(self, config): """ This IConfigurer implementation causes CKAN to look in the ```templates``` directory when looking for the package_form() """ here = os.path.dirname(__file__) rootdir = os.path.dirname(os.path.dirname(here)) template_dir = os.path.join(rootdir, 'ckanext', 'kata', 'theme', 'templates') config['extra_template_paths'] = ','.join([template_dir, config.get('extra_template_paths', '')]) public_dir = os.path.join(rootdir, 'ckanext', 'kata', 'public') config['extra_public_paths'] = ','.join([public_dir, config.get('extra_public_paths', '')]) toolkit.add_resource(public_dir, 'kata-resources') roles = config.get('kata.contact_roles', 'Please, Configure') config['package_hide_extras'] = ' '.join(self.kata_field) config['ckan.i18n_directory'] = os.path.join(rootdir, 'ckanext', 'kata') roles = [r for r in roles.split(', ')] self.roles = roles self.hide_extras_form = config.get('kata.hide_extras_form', '').split() log.debug("disable search") try: unload('synchronous_search') except: pass
def update_config(self, config): """ This IConfigurer implementation causes CKAN to look in the `templates` directory when looking for the `package_form()` """ toolkit.add_template_directory(config, 'theme/templates') toolkit.add_public_directory(config, 'theme/public') toolkit.add_resource('theme/public', 'kata-resources') # Fanstatic resource library here = os.path.dirname(__file__) rootdir = os.path.dirname(os.path.dirname(here)) roles = config.get('kata.contact_roles', 'Please, Configure') config['package_hide_extras'] = ' '.join(settings.KATA_FIELDS) config['ckan.i18n_directory'] = os.path.join(rootdir, 'ckanext', 'kata') roles = [r for r in roles.split(', ')] self.roles = roles self.hide_extras_form = config.get('kata.hide_extras_form', '').split() try: # This controls the operation of the CKAN search indexing. If you don't define this option # then indexing is on. You will want to turn this off if you have a non-synchronous search # index extension installed. unload('synchronous_search') log.debug("Disabled synchronous search") # Note: in CKAN 2.2, disabling this plugin causes other plugins to be reloaded except: log.debug("Failed to disable synchronous search!")
def update_config(self, config): """ This IConfigurer implementation causes CKAN to look in the `templates` directory when looking for the `package_form()` """ toolkit.add_template_directory(config, 'theme/templates') toolkit.add_public_directory(config, 'theme/public') toolkit.add_resource('theme/public', 'kata-resources') # Fanstatic resource library here = os.path.dirname(__file__) rootdir = os.path.dirname(os.path.dirname(here)) config['package_hide_extras'] = ' '.join(settings.KATA_FIELDS) config['ckan.i18n_directory'] = os.path.join(rootdir, 'ckanext', 'kata') try: # This controls the operation of the CKAN search indexing. If you don't define this option # then indexing is on. You will want to turn this off if you have a non-synchronous search # index extension installed. unload('synchronous_search') log.debug("Disabled synchronous search") # Note: in CKAN 2.2, disabling this plugin causes other plugins to be reloaded except: log.debug("Failed to disable synchronous search!")
def setup_class(cls): super(TestProjectBase, cls).setup_class() unload('project') unload('cadasta_organization')
def setup_class(cls): unload('project') unload('cadasta_organization')