|
@@ -96,7 +96,7 @@ class DatasourcePlugin(Plugin):
|
96
|
96
|
_plist_confspecs = {
|
97
|
97
|
'section': 'lodel2',
|
98
|
98
|
'key': 'datasource_connectors',
|
99
|
|
- 'default': None,
|
|
99
|
+ 'default': 'dummy_datasource',
|
100
|
100
|
'validator': SettingValidator(
|
101
|
101
|
'custom_list', none_is_valid = False,
|
102
|
102
|
validator_name = 'plugin', validator_kwargs = {
|
|
@@ -165,7 +165,8 @@ migration handler !!!")
|
165
|
165
|
#false
|
166
|
166
|
@staticmethod
|
167
|
167
|
def plugin_name(ds_name, ro):
|
168
|
|
- from lodel.settings import Settings
|
|
168
|
+ LodelContext.expose_modules(globals(), {
|
|
169
|
+ 'lodel.settings': ['Settings']})
|
169
|
170
|
# fetching connection identifier given datasource name
|
170
|
171
|
try:
|
171
|
172
|
ds_identifier = getattr(Settings.datasources, ds_name)
|
|
@@ -201,7 +202,8 @@ DS_PLUGIN_NAME.DS_INSTANCE_NAME. But got %s" % ds_identifier)
|
201
|
202
|
#@throw NameError if a datasource plugin or instance cannot be found
|
202
|
203
|
@staticmethod
|
203
|
204
|
def _get_ds_connection_conf(ds_identifier,ds_plugin_name):
|
204
|
|
- from lodel.settings import Settings
|
|
205
|
+ LodelContext.expose_modules(globals(), {
|
|
206
|
+ 'lodel.settings': ['Settings']})
|
205
|
207
|
if ds_plugin_name not in Settings.datasource._fields:
|
206
|
208
|
msg = "Unknown or unconfigured datasource plugin %s"
|
207
|
209
|
msg %= ds_plugin_name
|