summaryrefslogtreecommitdiff
path: root/src/mailman/rest/root.py
diff options
context:
space:
mode:
authorBarry Warsaw2012-12-30 14:34:25 -0500
committerBarry Warsaw2012-12-30 14:34:25 -0500
commit5ec8a131c602f9b00d6b25d914ffc923cd1aa964 (patch)
tree2d95a4745cf549ad4430fff6d21590156e4608ec /src/mailman/rest/root.py
parent9b95b54fb0913786a2d61049670cabcea6f78cce (diff)
downloadmailman-5ec8a131c602f9b00d6b25d914ffc923cd1aa964.tar.gz
mailman-5ec8a131c602f9b00d6b25d914ffc923cd1aa964.tar.zst
mailman-5ec8a131c602f9b00d6b25d914ffc923cd1aa964.zip
Diffstat (limited to 'src/mailman/rest/root.py')
-rw-r--r--src/mailman/rest/root.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mailman/rest/root.py b/src/mailman/rest/root.py
index ea1650e75..13ba68ea9 100644
--- a/src/mailman/rest/root.py
+++ b/src/mailman/rest/root.py
@@ -33,6 +33,7 @@ from mailman.config import config
from mailman.core.constants import system_preferences
from mailman.core.system import system
from mailman.interfaces.listmanager import IListManager
+from mailman.interfaces.styles import IStyleManager
from mailman.rest.addresses import AllAddresses, AnAddress
from mailman.rest.domains import ADomain, AllDomains
from mailman.rest.helpers import etag, path_to
@@ -122,6 +123,12 @@ class TopLevel(resource.Resource):
"""
if len(segments) == 0:
return AllLists()
+ elif len(segments) == 1 and segments[0] == 'styles':
+ manager = getUtility(IStyleManager)
+ style_names = sorted(style.name for style in manager.styles)
+ resource = dict(style_names=style_names,
+ default=config.styles.default)
+ return http.ok([], etag(resource))
else:
# list-id is preferred, but for backward compatibility,
# fqdn_listname is also accepted.