Exemple #1
0
    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')
Exemple #4
0
    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")
Exemple #5
0
    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('/'))
Exemple #6
0
 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')
Exemple #7
0
    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')
Exemple #8
0
    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')
Exemple #10
0
    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
Exemple #11
0
    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')
Exemple #12
0
 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')
Exemple #13
0
 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
Exemple #17
0
 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')
Exemple #20
0
 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
Exemple #21
0
 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')
Exemple #22
0
 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')
Exemple #26
0
    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')
Exemple #29
0
    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'})
Exemple #31
0
 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')
Exemple #33
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'cprvalidation')
Exemple #34
0
 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')
Exemple #35
0
    def update_config(self, config):

        toolkit.add_template_directory(config, 'templates')
        toolkit.add_resource('fanstatic', 'example_theme')
Exemple #36
0
 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")
Exemple #38
0
 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')
Exemple #39
0
 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')
Exemple #40
0
 def update_config(self, config):
     tk.add_template_directory(config, 'templates')
     tk.add_public_directory(config, 'public')
     tk.add_resource('fanstatic', 'hashvalidator')
Exemple #41
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'customuserprivileges')
Exemple #42
0
 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')
Exemple #44
0
 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')
Exemple #45
0
 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')
Exemple #46
0
 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')
Exemple #48
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'zippreview')
Exemple #49
0
 def update_config(self, config_):
     tk.add_template_directory(config_, 'templates')
     tk.add_public_directory(config_, 'public')
     tk.add_resource('fanstatic', 'forum')
Exemple #50
0
 def update_config(self, config):
     '''
     :param config:
     '''
     toolkit.add_template_directory(config, 'theme/templates')
     toolkit.add_resource('theme/assets', 'ckanext-gbif')
Exemple #51
0
 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')
Exemple #52
0
 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')
Exemple #53
0
 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')
Exemple #54
0
 def update_config(self, config):
     toolkit.add_template_directory(config, 'templates')
     toolkit.add_public_directory(config, 'public')
     toolkit.add_resource('fanstatic', 'portalopendatadk')
Exemple #55
0
 def update_config(self, config):
     toolkit.add_template_directory(config, 'templates')
     toolkit.add_resource('fanstatic/resources', 'ckanext-datesearch')
Exemple #56
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'datagovcatalog')
Exemple #57
0
 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 - ')
Exemple #58
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'transparencyderp')
Exemple #59
0
 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')