6 Oct
2017
6 Oct
'17
9:35 p.m.
So the way this will work is that you want to create a new style which will be the same as ‘legacy-default’ but sets the language to ‘no’. Something like the following (untested):
from mailman.interfaces.styles import IStyle from mailman.styles.base import ( BasicOperation, Bounces, Discussion, Identity, Moderation, Public) from public import public from zope.interface import implementer @public @implementer(IStyle) class NOStyle(Identity, BasicOperation, Bounces, Public, Discussion, Moderation): name = ’no-default' def apply(self, mailing_list): """See `IStyle`.""" Identity.apply(self, mailing_list) BasicOperation.apply(self, mailing_list) Bounces.apply(self, mailing_list) Public.apply(self, mailing_list) Discussion.apply(self, mailing_list) Moderation.apply(self, mailing_list) mailing_list.preferred_language = ‘no’
Barry,
Thanks, I'll try that tomorrow. Now, I'm a 98% Python illiterate.. so it's not obvious to me where I should put this. However, styles/default.py looks like a candiate. Is that correct? Then, should I just add NOstyle as a class and leave LegacyDefaultStyle just the way it is?
Thor