diff options
| author | Barry Warsaw | 2012-12-30 13:37:59 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2012-12-30 13:37:59 -0500 |
| commit | 9b95b54fb0913786a2d61049670cabcea6f78cce (patch) | |
| tree | 51469f9c0bc665163546724f7fdbfa408f4d4ded /src/mailman/styles/docs | |
| parent | 78340d7ebc67ac7aeb6734ec4a8f025fb799cba8 (diff) | |
| download | mailman-9b95b54fb0913786a2d61049670cabcea6f78cce.tar.gz mailman-9b95b54fb0913786a2d61049670cabcea6f78cce.tar.zst mailman-9b95b54fb0913786a2d61049670cabcea6f78cce.zip | |
* 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.
Diffstat (limited to 'src/mailman/styles/docs')
| -rw-r--r-- | src/mailman/styles/docs/styles.rst | 19 |
1 files changed, 12 insertions, 7 deletions
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: |
