[Mailman-Developers] Mailman 3 and New Lists (Templates for Defining?)

Barry Warsaw barry at list.org
Wed Mar 6 21:44:27 CET 2013

On Mar 05, 2013, at 07:51 PM, Tom Browder wrote:

>> Yes, these are called "list styles".  See the IStyle interface in
>> src/mailman/interfaces/styles.py for the API and
>> src/mailman/styles/default.py for the two built-in styles, both essentially
>> legacy styles.
>Ah, that's where it is!  (And I assume ALL "attributes" are defined
>there.)  But to my non-Python eyes I see only one actually defined.

There are two classes in default.py, LegacyDefaultStyle and
LegacyAnnounceOnly, both of which have @implementer(IStyle) decorators.  This
is the way you declare that a class implements a particular interface, and
it's how Mailman auto-discovers available styles.

>But there is where we could add some other mailman-defined styles, correct?

Probably not.  However, if we wanted to package some new "out-of-the-box"
styles, we'd probably create a new module in that directory and add new
classes there that declare they implement the IStyle.

But MM3 is designed to be extensible, so your own styles don't need to be in
this package directory.  As long as they are on Python's sys.path, and defined
in your own mailman.cfg file, Mailman should be able to find them and allow
them to be used.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/mailman-developers/attachments/20130306/e65f05bd/attachment.pgp>

More information about the Mailman-Developers mailing list