示例#1
0
    def configure(self, config):
        if 'ckan.drupal.url' in config:
            wcms_configure(config['ckan.drupal.url'])

        if 'canada.notification_new_user_email' in config:
            ckan_user_create_dict['email_address'] = config['canada.notification_new_user_email']
            if 'canada.notification_new_user_name' in config:
                ckan_user_create_dict['email_name'] = config['canada.notification_new_user_name']
            else:
                ckan_user_create_dict['email_name'] = config['canada.notification_new_user_email']
            create.user_create = notify_ckan_user_create
示例#2
0
    def configure(self, config):
        if 'ckan.drupal.url' in config:
            wcms_configure(config['ckan.drupal.url'])

        if 'canada.notification_new_user_email' in config:
            ckan_user_create_dict['email_address'] = config[
                'canada.notification_new_user_email']
            if 'canada.notification_new_user_name' in config:
                ckan_user_create_dict['email_name'] = config[
                    'canada.notification_new_user_name']
            else:
                ckan_user_create_dict['email_name'] = config[
                    'canada.notification_new_user_email']
            create.user_create = notify_ckan_user_create
示例#3
0
    def configure(self, config):
        if 'ckan.drupal.url' in config:
            wcms_configure(config['ckan.drupal.url'])

        # FIXME: monkey-patch datastore upsert_data
        from ckanext.datastore import db
        original_upsert_data = db.upsert_data

        def patched_upsert_data(context, data_dict):
            logic.datastore_create_temp_user_table(context)
            return original_upsert_data(context, data_dict)

        if db.upsert_data.__name__ == 'upsert_data':
            db.upsert_data = patched_upsert_data
示例#4
0
    def configure(self, config):

        if ('ckan.drupal.url' in config):
            wcms_configure(config['ckan.drupal.url'])
示例#5
0
    def configure(self, config):

        if ('ckan.drupal.url' in config):
            wcms_configure(config['ckan.drupal.url'])
    def configure(self, config):

        if "ckan.drupal.url" in config:
            wcms_configure(config["ckan.drupal.url"])