Пример #1
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')
Пример #2
0
 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'
     )
Пример #3
0
 def update_config(self, config):
     tk.add_template_directory(config, 'templates')
     tk.add_public_directory(config, 'public')
     # 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_showcase_admins',
                               'Showcase Config')
Пример #4
0
    def update_config(self, config):
        # Work around an issue with XLRD 0.8 where it logs to stdout by
        # accident (and wsgi tells it off).
        sys.stdout = sys.stderr

        toolkit.add_template_directory(config, 'templates')
        toolkit.add_public_directory(config, 'public')
 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')
Пример #6
0
 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')
Пример #7
0
 def update_config(self, config):
     """
     This IConfigurer implementation causes CKAN to look in the `templates`
     or 'public' directories present in this package for any customisations.
     """
     toolkit.add_template_directory(config, 'templates')
     toolkit.add_public_directory(config, 'public')
Пример #8
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')
Пример #9
0
    def update_config(self, config):  
        our_public_dir = os.path.join('theme', 'public')
        template_dir = os.path.join('theme', 'templates')

        # overriding configuration fields:
        # set our local template and resource overrides
        toolkit.add_public_directory(config, our_public_dir)
        toolkit.add_template_directory(config, template_dir)

        config['ckan.site_title'] = "Datenregister Berlin"
        config['ckan.site_logo'] = "/images/berlin_open_data.png"
        config['ckan.favicon'] = "/favicon.ico"
        config['ckan.locale_default'] = "de"
        config['ckan.locale_order'] = "de en"
        config['ckan.locales_filtered_out'] = "ar bg ca cs_CZ da_DK el en_AU es fa_IR fi fr he hr hu id is it ja km ko_KR lt lv mn_MN ne nl no pl pt_BR pt_PT ro ru sk sl sq sr sr_Latn sv th tr uk_UA vi zh_CN zh_TW"
        config['licenses_group_url'] = "https://datenregister.berlin.de/licenses/berlin-od-portal.json"

        # authentication stuff:
        config['ckan.auth.anon_create_dataset'] = False
        config['ckan.auth.create_unowned_dataset'] = True
        config['ckan.auth.create_dataset_if_not_in_organization'] = True
        config['ckan.auth.user_create_groups'] = False
        config['ckan.auth.user_create_organizations'] = False
        config['ckan.auth.user_delete_groups'] = False
        config['ckan.auth.user_delete_organizations'] = False
        config['ckan.auth.create_user_via_api'] = False
        config['ckan.auth.create_user_via_web'] = False
        config['ckan.auth.roles_that_cascade_to_sub_groups'] = 'admin'
Пример #10
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')

        # Register this plugin's fanstatic directory with CKAN.
        tk.add_resource('fanstatic', 'privatedatasets')
Пример #11
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!")
Пример #12
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")
Пример #13
0
    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
Пример #14
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')
Пример #15
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('public', 'ckanext-publicamundi-geodata-theme')
Пример #16
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')
Пример #17
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('/'))
Пример #18
0
 def update_config(self, config):
     log.debug('this is update_config calling')
     # 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 the extension public directory so we can serve our own content
     tk.add_public_directory(config, 'templates/public')
Пример #19
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')
Пример #20
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')
Пример #21
0
    def update_config(self, config):
        """Update CKAN's config with settings needed by this plugin.

        """
        toolkit.add_template_directory(config, "templates")
        self.header_parameter = config.get("ckan.simplesso.header_parameter", "user-id")
        self.email_domain = config.get("ckan.simplesso.email_domain")
Пример #22
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')
Пример #23
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')
Пример #24
0
 def update_config(self, config):
     toolkit.add_template_directory(config, 'templates')
     toolkit.add_template_directory(config, '/var/www/resources/templates')
     toolkit.add_public_directory(config, '/var/www/resources')
     toolkit.add_public_directory(config, 'public')
     toolkit.add_resource('public/css/', 'ytp_css')
     toolkit.add_resource('/var/www/resources', 'ytp_resources')
     toolkit.add_resource('public/js/', 'ytp_js')
Пример #25
0
 def update_config(self, config):
     # Add extension templates directory
     toolkit.add_template_directory(config, 'templates')
     # Add a new ckan-admin tabs for our extension
     toolkit.add_ckan_admin_tab(config, 'ckanext_myext_config_one',
                                'My First Custom Config Tab')
     toolkit.add_ckan_admin_tab(config, 'ckanext_myext_config_two',
                                'My Second Custom Config Tab')
Пример #26
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')
Пример #27
0
 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
Пример #28
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")

        # Add this plugin's public dir to CKAN's extra_public_paths, so
        # that CKAN will use this plugin's custom static files.
        tk.add_public_directory(config, "public")
Пример #29
0
 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')
Пример #30
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
Пример #31
0
    def update_config(self, config_):
        toolkit.add_template_directory(config_, 'templates')
        toolkit.add_public_directory(config_, 'public')
        toolkit.add_resource('fanstatic', 'subscribe')

        subscribe_model.setup()
Пример #32
0
 def update_config(self, config):
     tk.add_template_directory(config, 'templates')
     tk.add_public_directory(config, 'public')
     tk.add_resource('fanstatic', 'hashvalidator')
Пример #33
0
 def update_config(self, config):
     toolkit.add_template_directory(config, 'templates')
     toolkit.add_public_directory(config, 'public')
     toolkit.add_resource('fanstatic', 'portalopendatadk')
Пример #34
0
 def update_config(self, config):
     # Add extension templates directory
     toolkit.add_template_directory(config, 'templates')
     toolkit.add_public_directory(config, 'public')
     toolkit.add_resource('fanstatic', 'ckanext-dcatapit')
Пример #35
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('styles/css', 'gobar_css')
     toolkit.add_resource('js', 'gobar_js')
     toolkit.add_resource('recline', 'gobar_data_preview')
Пример #36
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'xroad_integration')
Пример #37
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('assets', 'testext')
Пример #38
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'facetcollapse')
 def update_config(self, config):
     toolkit.add_resource('textbox/theme', 'textbox')
     toolkit.add_template_directory(config, 'textbox/templates')
Пример #40
0
 def update_config(self, config):
     toolkit.add_template_directory(config, "templates")
     toolkit.add_public_directory(config, "static")
Пример #41
0
 def update_config(self, config_):
     t.add_template_directory(config_, 'templates')
Пример #42
0
 def update_config(self, config):
     toolkit.add_template_directory(config, 'templates')
     toolkit.add_public_directory(config, 'public')
     #toolkit.add_resource('public', 'ckanext-publicamundi')
     toolkit.add_resource('fanstatic', 'geoportal_theme')
Пример #43
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     #toolkit.add_resource('fanstatic', 'landdbcustomize')
     toolkit.add_resource('assets', 'landdbcustomize')
Пример #44
0
 def update_config(self, config):
     tk.add_template_directory(config, 'templates')
     tk.add_public_directory(config, 'public')
     if tk.check_ckan_version(min_version='2.4'):
         tk.add_ckan_admin_tab(config, 'ckanext_showcase_admins',
                               'Showcase Config')
Пример #45
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'runtimeconfig')
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'fanstatic')
     toolkit.add_resource('public', 'defrareports')
Пример #47
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'upload_via_email')
Пример #48
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'agueda_theme')
Пример #49
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'ckanext-datacitation')
Пример #50
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')
Пример #51
0
 def update_config(self, config):
     """
     We have some form snippets that support ckanext-scheming
     """
     add_template_directory(config, 'templates')
Пример #52
0
 def update_config(self, config):
     from ckan.plugins import toolkit
     toolkit.add_template_directory(config, 'templates')
Пример #53
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, 'templates')
     toolkit.add_public_directory(config_, 'public')
     toolkit.add_resource('fanstatic', 'mapactiongeorss')
Пример #54
0
 def update_config(self, config_):
     toolkit.add_template_directory(config_, '../templates')
     toolkit.add_public_directory(config_, '../public')
     toolkit.add_resource('../fanstatic', 'matomo')
     toolkit.add_resource('../public/javascript/', 'ckanext-matomo_js')
Пример #55
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 - ')
Пример #56
0
 def update_config(self, config):
     toolkit.add_template_directory(config, 'templates')
     toolkit.add_public_directory(config, 'public')
     toolkit.add_resource('fanstatic', 'blob-storage')
Пример #57
0
	def update_config(self, config):
		tk.add_template_directory(config, 'templates')
		tk.add_public_directory(config, 'public')
		return config
Пример #58
0
 def update_config(self, config):
     # add the template dir
     tk.add_template_directory(config, 'templates')
Пример #59
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')
Пример #60
0
 def update_config(self, config):
     tk.add_template_directory(config, 'templates')