On 05/04/2016 10:48 AM, Beu, Ed (DOA) wrote: > > DEFAULT_DEFAULT_MEMBER_MODERATION = Yes >>>> The double DEFAULT_DEFAULT on this variable appears to be the only doubled >>>> default in the Defaults.py file. And, using it in the same manner in the >>>> MM_CFG.py file appears to be the only way to get it to work when creating >>>> a new list.
That is correct. It is called DEFAULT_DEFAULT_MEMBER_MODERATION because it establishes the new list default for the list attribute default_member_moderation. For all list attributes named xxx which have a default setting in Defaults.py, the Defaults.py setting is called DEFAULT_XXX. For this one, the setting name begins with default... so the Defaults.py default is DEFAULT_DEFAULT... mm_cfg.py settings are overrides for the Defaults.py settings. Anything defined in mm_cfg.py overrides the definition of the setting with the same name in Defaults.py. Anything defined in mm_cfg.py which is not defined in Defaults.py is not referenced in the code and is therefore meaningless. > For the occasional 'discussion' list I have created a config file > (discuss.config) to import into the new list to change 'Member Moderation' to > No, but it does not take effect. > > For example, I'm using this command: .../bin> ./newlist -q testdiscuss > [email protected]<mailto:[email protected]> 12345678;./config_list -i > discuss.config testdiscuss >>>> I change the entry in the MM_CFG.py file to: > DEFAULT_DEFAULT_MEMBER_MODERATION = 1 (1 rather than Yes) That doesn't matter. Defaults.py defines Yes = yes = On = on = True and those things and also 1 are all equivalent in this respect. >>>> used the following statement in my discuss.config file - and it's working >>>> now > default_member_moderation = 0 But config_list doesn't define things like Yes, yes, On, on, No, no, Off, off so you can't use them in setting list attributes. You have to use the actual (lower case) list attribute name, not a name from Defaults.py and you have to use values like 0, 1, False or True, not Yes, yes, On, on, No, no, Off or off. > Is it not possible to override the mm_cfg.py file entries with a config_list > -i command? >>>> apparently the config_list -i does run after mm_cfg.py!! The Defaults.py/mm_cfg.py DEFAULT settings set list attributes when a list is created via newlist or the web UI. mm_cfg.py doesn't 'run' at all in the sense that new_list or config_list run. pretty much everything in Mailman imports mm_cfg.py (which in turn imports Defaults.py before setting any of it's overrides. This establishes the site configuration for Mailman. When you run newlist, it creates the list and the list creation process uses the DEFAULT... settings from Defaults.py/mm_cfg.py in establishing the settings for that list. config_list -i operates on an existing list and sets those list attributes that are in it's input. So yes, config_list -i will set anything in it's input. mm_cfg.py DEFAULT settings do not come into play at this point. The important thing to note is that once a list is created, changes to DEFAULT... settings in mm_cfg.py will not affect anything on an existing list. -- Mark Sapiro <[email protected]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list [email protected] https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
