mirror of
https://github.com/Kozea/Radicale.git
synced 2025-09-15 20:36:55 +00:00
Use the same import mechanisms for auth, storage, rights
This commit is contained in:
parent
3ddbb80674
commit
17857654b0
7 changed files with 113 additions and 134 deletions
|
@ -24,12 +24,14 @@ configuration.
|
|||
|
||||
"""
|
||||
|
||||
from radicale import config
|
||||
from radicale import config, ical
|
||||
|
||||
|
||||
def load():
|
||||
"""Load list of available storage managers."""
|
||||
storage_type = config.get("storage", "type")
|
||||
module = __import__(
|
||||
root_module = __import__(
|
||||
"storage.%s" % storage_type, globals=globals(), level=2)
|
||||
return getattr(module, storage_type)
|
||||
module = getattr(root_module, storage_type)
|
||||
ical.Collection = module.Collection
|
||||
return module
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue