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): ''' Set up the resource library, public directory and template directory for the preview ''' toolkit.add_public_directory(config, 'theme/public') toolkit.add_template_directory(config, 'theme/templates') toolkit.add_resource('theme/public', 'ckanext-multilingual_datastore')
def update_config(self, config): ''' IConfigurer ''' # Add this plugin's templates dir to CKAN's extra_template_paths, so # that CKAN will use this plugin's custom templates. tk.add_template_directory(config, 'templates') # Add fanstatic folder for serving JS & CSS tk.add_resource('fanstatic', 'dataproxy')
def update_config(self, config): # Add this plugin's templates dir to CKAN's extra_template_paths, so # that CKAN will use this plugin's custom templates. toolkit.add_template_directory(config, "templates") toolkit.add_public_directory(config, "public") toolkit.add_resource("fanstatic", "gongio")
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'opendataje') config_['licenses_group_url'] = '{0}/licenses.json'.format( config_['ckan.site_url'].rstrip('/'))
def update_config(self, config_): # Add this plugin's templates dir to CKAN's extra_template_paths, so # that CKAN will use this plugin's custom templates. #tk.add_template_directory(config, 'templates') tk.add_template_directory(config_, 'templates') tk.add_public_directory(config_, 'public') tk.add_resource('fanstatic', 'datakat')
def update_config(self, config): toolkit.add_public_directory(config, '/var/www/resources') toolkit.add_resource('public/javascript/', 'ytp_service_js') toolkit.add_template_directory(config, 'templates') toolkit.add_resource('../common/public/javascript/', 'ytp_common_js') toolkit.add_template_directory(config, '../common/templates')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_resource('theme/resources', 'deadoralive') if toolkit.check_ckan_version(max_version='2.2.999'): # Add CKAN version 2.2 support templates. toolkit.add_template_directory(config_, '2.2_templates')
def update_config(self, config): # Add this plugin's templates dir to CKAN's extra_template_paths, so # that CKAN will use this plugin's custom templates. tk.add_template_directory(config, 'templates') # Register this plugin's fanstatic directory with CKAN. tk.add_resource('fanstatic', 'privatedatasets')
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): '''Update CKAN's config with settings needed by this plugin. ''' toolkit.add_template_directory(config, 'templates') toolkit.add_public_directory(config, 'public') toolkit.add_resource('fanstatic', 'persona')
def update_config(self, config): ''' Set up the resource library, public directory and template directory for the view ''' toolkit.add_template_directory(config, u'templates') toolkit.add_resource(u'public', u'ckanext-datatablesview')
def update_config(self, config): tk.add_template_directory(config, 'templates') tk.add_public_directory(config, 'public') tk.add_resource('fanstatic', 'project') # If ckan is more than 2.3, use the 2.4+ toolkit method if not tk.check_ckan_version(max_version='2.3'): tk.add_ckan_admin_tab(config, 'ckanext_project_admins', 'project Config')
def update_config(self, config): # Add this plugin's templates dir to CKAN's extra_template_paths, so # that CKAN will use this plugin's custom templates. toolkit.add_template_directory(config, 'templates') toolkit.add_public_directory(config, 'public') toolkit.add_resource('public', 'ckanext-publicamundi-geodata-theme')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'drupal_menu_sync') toolkit.add_ckan_admin_tab( config_, 'drupal_menu_sync_admin', 'Manage Menu sync' )
def update_config(self, config): toolkit.add_template_directory(config, 'templates') toolkit.add_public_directory(config, 'public') toolkit.add_resource('fanstatic', 'dane_publiczne') toolkit.add_resource('fanstatic', 'ckanext-reclineview') mimetypes.add_type('application/json', '.geojson') # TODO ckan-dev load all properties from SystemInfo at load, instead of using app_globals.auto_update: # TODO ckan-dev def get_globals_key(key): should allow ckanext. app_globals.auto_update += [ 'ckanext.danepubliczne.maintenance_flash', ] for locale in h.get_available_locales(): lang = locale.language app_globals.auto_update += ['ckan.site_intro_text-' + lang, 'ckan.site_about-' + lang] # don't show user names in activity stream def get_snippet_actor_org(activity, detail): return literal('''<span class="actor">%s</span>''' % (linked_org_for(activity['user_id'], 0, 30)) ) activity_streams.activity_snippet_functions['actor'] = get_snippet_actor_org
def update_config(self, config): tk.add_template_directory(config, 'templates') tk.add_public_directory(config, 'public') tk.add_resource('resources', 'dara') mimetypes.add_type('STATA do', '.do') mimetypes.add_type('STATA data', '.dta') mimetypes.add_type('SRC', '.src')
def update_config(self, config): # Add plugin's template directory toolkit.add_template_directory(config, "templates") # Add plugin's js/css directory toolkit.add_resource("fanstatic", "clipboard-base") toolkit.add_resource("fanstatic", "clipboard-core")
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'wsdl_view') relpath = "./xslt/wsdl_to_html.xslt" path = os.path.join(os.path.dirname(os.path.realpath(__file__)), relpath) self.wsdl_to_html = etree.XSLT(etree.parse(path)) mimetypes.add_type('wsdl', '.wsdl')
def update_config(self, config): tk.add_template_directory(config, 'templates') tk.add_public_directory(config, 'public') tk.add_public_directory(config, 'jdainfo/static') tk.add_template_directory(config, 'jdainfo/md') tk.add_resource('theme', 'edawax') tk.add_resource('fanstatic', 'edawax_fs') h.get_facet_items_dict = get_facet_items_dict
def update_config(self, config): # Add this plugin's templates dir to CKAN's extra_template_paths, so # that CKAN will use this plugin's custom templates. # 'templates' is the path to the templates dir, relative to this # plugin.py file. toolkit.add_template_directory(config, 'templates') toolkit.add_public_directory(config, 'public') toolkit.add_resource('public','ckanext-datigovit')
def update_config(self, config): toolkit.add_template_directory(config, 'templates') toolkit.add_public_directory(config, 'public') toolkit.add_resource('fanstatic', 'gov_theme') ckan.logic.schema.default_user_schema = _schema.default_user_schema ckan.logic.schema.user_new_form_schema = _schema.user_new_form_schema ckan.logic.schema.user_edit_form_schema = _schema.user_edit_form_schema ckan.logic.schema.default_update_user_schema = _schema.default_update_user_schema
def update_config(self, config): ''' Set up the resource library, public directory and template directory for the preview ''' toolkit.add_public_directory(config, 'theme/public') toolkit.add_template_directory(config, 'theme/templates') toolkit.add_resource('theme/public', 'ckanext-interlinking') toolkit.add_resource('theme/public/vendor/slickgrid', 'ckanext-interlinking-slickgrid')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'accessrequests') activity_stream_string_functions[ 'reject new user'] = activity_stream_string_reject_new_user activity_stream_string_functions[ 'approve new user'] = activity_stream_string_approve_new_user
def update_config(self, config): # see IConfigurer plugin interface # Tells CKAN to use the template and # snippet files toolkit.add_template_directory(config, 'templates') # Tells CKAN where to find JS and CSS files toolkit.add_resource('fanstatic', 'ic_theme')
def update_config(self, config): # from the IConfigurer interface, we're telling ckan # where our templates are kept in this pluign toolkit.add_template_directory(config, 'templates') # add our extension's public directory, to include the custom css file toolkit.add_public_directory(config, 'public') toolkit.add_resource('fanstatic', 'lcrnz')
def update_config(self, config): #This plugin's templates. toolkit.add_template_directory(config, 'templates') #This plugin public files. toolkit.add_public_directory(config, 'public') #This plugin fanstatic files. toolkit.add_resource('fanstatic', 'widget')
def update_config(self, config): '''Update CKAN's configuration. See IConfigurer. ''' toolkit.add_template_directory(config, 'templates/datapackager_ckan_theme') toolkit.add_resource('fanstatic', 'datapackager')
def update_config(self, config_): ''' Extends the templates directory and adds fanstatic. :param config_: Passed from CKAN framework ''' toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'ioos_theme')
def update_config(self, config): here = os.path.dirname(__file__) tk.add_template_directory(config, 'templates') tk.add_public_directory(config, 'public') tk.add_resource('fanstatic', 'ckanext-vdojstats') #configure vicdoj export directory and header site_id = config.get('ckan.site_id', 'default') config.update({'vdojstats.export_dir': '/tmp/export/%s/'%(site_id)}) config.update({'vdojstats.export_header': 'Victoria DoJ'})
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_resource('templates/js', 'js')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'hazdat_theme')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'cprvalidation')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') # richiesto per le pagine html toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'LDAPLogin')
def update_config(self, config): toolkit.add_template_directory(config, 'templates') toolkit.add_resource('fanstatic', 'example_theme')
def update_config(self, config): toolkit.add_template_directory(config, 'templates') toolkit.add_resource('fanstatic', 'montrose') toolkit.add_public_directory(config, 'public')
def update_config(self, config_): toolkit.add_template_directory(config_, "templates") toolkit.add_public_directory(config_, "public") toolkit.add_resource("fanstatic", "kdl_madih")
def update_config(self, config): add_template_directory(config, 'templates') add_public_directory(config, 'public') # TODO @palcu: translate this string add_ckan_admin_tab(config, 'inventory_admin_index', 'Activate Users') add_resource('fanstatic', 'inventory')
def update_config(self, config_): if is_frontend(): toolkit.add_public_directory(config_, 'public') toolkit.add_template_directory(config_, 'templates') toolkit.add_resource('fanstatic', 'dge_dashboard')
def update_config(self, config): tk.add_template_directory(config, 'templates') tk.add_public_directory(config, 'public') tk.add_resource('fanstatic', 'hashvalidator')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'customuserprivileges')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'ccca') toolkit.add_resource('public/base/vendor', 'vendor')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'configpermission') toolkit.add_ckan_admin_tab(config_, 'management_view', 'Permissions')
def update_config(self, config): toolkit.add_public_directory(config, 'theme/public') toolkit.add_template_directory(config, 'theme/templates') toolkit.add_resource('theme/public', 'ckanext-mongodatastore')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'rating') toolkit.add_resource('public/css/', 'rating_css') toolkit.add_resource('public/js/', 'rating_js')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'odata_org_il')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'activitiestracker')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'zippreview')
def update_config(self, config_): tk.add_template_directory(config_, 'templates') tk.add_public_directory(config_, 'public') tk.add_resource('fanstatic', 'forum')
def update_config(self, config): ''' :param config: ''' toolkit.add_template_directory(config, 'theme/templates') toolkit.add_resource('theme/assets', 'ckanext-gbif')
def update_config(self, config): toolkit.add_public_directory(config, 'public') toolkit.add_template_directory(config, 'templates') toolkit.add_resource('fanstatic', 'edc_resource') toolkit.add_resource('public/scripts', 'theme_scripts')
def update_config(self, config_): toolkit.add_public_directory(config_, 'theme/public') toolkit.add_template_directory(config_, 'theme/templates') toolkit.add_resource('theme/public', 'cartodbmap')
def update_config(self, config): # Add this plugin's templates dir to CKAN's extra_template_paths, so # that CKAN will use this plugin's custom templates. tk.add_template_directory(config, 'templates') tk.add_public_directory(config, 'public') tk.add_resource('fanstatic', 'rer')
def update_config(self, config): toolkit.add_template_directory(config, 'templates') toolkit.add_public_directory(config, 'public') toolkit.add_resource('fanstatic', 'portalopendatadk')
def update_config(self, config): toolkit.add_template_directory(config, 'templates') toolkit.add_resource('fanstatic/resources', 'ckanext-datesearch')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'datagovcatalog')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'ider_security') ckan.logic.validators.user_password_validatoy = user_password_validator print(' -Ider_SecurityPlugin - ')
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'transparencyderp')
def update_config(self, config): tk.add_template_directory(config, "templates") tk.add_public_directory(config, "assets") tk.add_resource("assets", "hierarchy")
def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'switzerland')