From 9b95b54fb0913786a2d61049670cabcea6f78cce Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sun, 30 Dec 2012 13:37:59 -0500 Subject: * The default list style is renamed to `legacy-default` and a new `legacy-announce` style is added. This is similar to the `legacy-default` except set up for announce-only lists. Also, major refactoring of the default style into (hopefully) smaller composable units. --- src/mailman/styles/docs/styles.rst | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/mailman/styles/docs') diff --git a/src/mailman/styles/docs/styles.rst b/src/mailman/styles/docs/styles.rst index e4c8f754f..00d95b08d 100644 --- a/src/mailman/styles/docs/styles.rst +++ b/src/mailman/styles/docs/styles.rst @@ -1,3 +1,5 @@ +.. _list-styles: + =========== List styles =========== @@ -12,14 +14,15 @@ automatically updated. Instead, think of styles as the initial set of defaults for just about any mailing list attribute. In fact, application of a style to a mailing list can really modify the mailing list in any way. -To start with, there is only one style, the default style. +To start with, there are a few legacy styles. >>> from zope.component import getUtility >>> from mailman.interfaces.styles import IStyleManager >>> manager = getUtility(IStyleManager) >>> for style in manager.styles: ... print style.name - default + legacy-announce + legacy-default When you create a mailing list through the low-level `IListManager` API, no style is applied. @@ -29,9 +32,9 @@ style is applied. >>> print mlist.display_name None -The default style sets the list's display name. +The legacy default style sets the list's display name. - >>> manager.get('default').apply(mlist) + >>> manager.get('legacy-default').apply(mlist) >>> print mlist.display_name Ant @@ -59,7 +62,8 @@ All registered styles are returned in alphabetical order by style name. >>> for style in manager.styles: ... print style.name a-test-style - default + legacy-announce + legacy-default You can also ask the style manager for the style, by name. @@ -76,7 +80,8 @@ You can unregister a style, making it unavailable in the future. >>> manager.unregister(test_style) >>> for style in manager.styles: ... print style.name - default + legacy-announce + legacy-default Asking for a missing style returns None. @@ -105,7 +110,7 @@ The style has been applied. TEST STYLE LIST If no style name is provided when creating the list, the system default style -(which may or may not be the style named 'default') is applied. +(taken from the configuration file) is applied. >>> @implementer(IStyle) ... class AnotherStyle: -- cgit v1.2.3-70-g09d2