use topics from tabellio.config

This commit is contained in:
Frédéric Péters 2016-10-06 17:21:25 +02:00
parent 554360b04b
commit 86e28a175b
1 changed files with 9 additions and 1 deletions

View File

@ -248,7 +248,15 @@ class SubjectsSource(object):
implements(IContextSourceBinder)
def __init__(self):
# XXX get this list from the catalog
if ITabellioSettings:
settings = component.getUtility(IRegistry).forInterface(ITabellioSettings, False)
topics = settings.topics
if topics:
self.terms = [x.strip() for x in topics.splitlines() if x]
return
# fallback on static list
self.terms = [
u"Action sociale",
u"Budget",