add persistent option for db
This commit is contained in:
@ -34,7 +34,7 @@ ro_append = ('frozen', 'disabled', 'validator', 'everything_frozen',
|
||||
rw_remove = ('permissive', 'everything_frozen', 'mandatory')
|
||||
rw_append = ('frozen', 'disabled', 'validator', 'hidden')
|
||||
default_properties = ('expire', 'validator')
|
||||
default_storage = 'dictionary'
|
||||
storage_type = 'dictionary'
|
||||
|
||||
|
||||
class _const:
|
||||
@ -183,13 +183,13 @@ class Settings(object):
|
||||
"``Config()``'s configuration options"
|
||||
__slots__ = ('context', '_owner', '_p_')
|
||||
|
||||
def __init__(self, context, config_id, plugin_name):
|
||||
def __init__(self, context, storage):
|
||||
# generic owner
|
||||
self._owner = owners.user
|
||||
self.context = context
|
||||
import_lib = 'tiramisu.plugins.{0}.setting'.format(plugin_name)
|
||||
import_lib = 'tiramisu.storage.{0}.setting'.format(storage_type)
|
||||
self._p_ = __import__(import_lib, globals(), locals(), ['Settings'],
|
||||
-1).Settings(config_id)
|
||||
-1).Settings(storage)
|
||||
|
||||
def _getkey(self, opt):
|
||||
if self._p_.key_is_path:
|
||||
|
Reference in New Issue
Block a user