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.

Cheers,
-Barry

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Reply via email to