18 lines
593 B
Python
18 lines
593 B
Python
from zope import component
|
|
from plone.registry.interfaces import IRegistry
|
|
from interfaces import ITabellioSettings
|
|
|
|
|
|
def get_dossiers_path():
|
|
return component.getUtility(IRegistry).forInterface(ITabellioSettings, False).dossiersPath
|
|
|
|
def get_documents_path():
|
|
return component.getUtility(IRegistry).forInterface(ITabellioSettings, False).documentsPath
|
|
|
|
|
|
def get_sessions():
|
|
settings = component.getUtility(IRegistry).forInterface(ITabellioSettings, False)
|
|
sessions = settings.sessions
|
|
terms = [x.split(':')[1].strip() for x in sessions.splitlines() if x]
|
|
return terms
|