Use config from ckan.plugins.toolkit
This commit is contained in:
parent
73e4049c15
commit
68dc704d6b
|
@ -22,7 +22,6 @@ import ckanext.privatedatasets.constants as constants
|
|||
import db
|
||||
import importlib
|
||||
import logging
|
||||
import pylons.config as config
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -146,7 +145,7 @@ def _process_package(context, request_data):
|
|||
plugins.toolkit.check_access(method, context, request_data)
|
||||
|
||||
# Get the parser from the configuration
|
||||
class_path = config.get(PARSER_CONFIG_PROP, '')
|
||||
class_path = plugins.toolkit.config.get(PARSER_CONFIG_PROP, '')
|
||||
|
||||
if class_path != '':
|
||||
try:
|
||||
|
|
|
@ -21,8 +21,6 @@ import ckan.model as model
|
|||
import ckan.plugins.toolkit as tk
|
||||
import db
|
||||
|
||||
from pylons import config
|
||||
|
||||
from ckan.common import request
|
||||
|
||||
import logging
|
||||
|
@ -62,7 +60,7 @@ def can_read(pkg_dict):
|
|||
|
||||
|
||||
def get_config_bool_value(config_name, default_value=False):
|
||||
value = config.get(config_name, default_value)
|
||||
value = tk.config.get(config_name, default_value)
|
||||
value = value if type(value) == bool else value != 'False'
|
||||
return value
|
||||
|
||||
|
|
Loading…
Reference in New Issue