Attachment 'extend.py'

Download

   1 from Mailman import mm_cfg
   2 def extend(mlist):
   3     if hasattr(mlist, 'pipeline'):
   4         pl = mlist.pipeline
   5     else:
   6         pl = mm_cfg.GLOBAL_PIPELINE
   7     if 'PostLimit' not in pl:
   8         pl.insert(pl.index('Moderate'), 'PostLimit')
   9         mlist.pipeline = pl
  10     if not hasattr(mlist, 'post_member_limit'):
  11         # To limit the number of member posts per period, set the following
  12         # to the limit.
  13         mlist.post_member_limit = 0
  14     if not hasattr(mlist, 'post_list_limit'):
  15         # To limit the number of list posts per period, set the following
  16         # to the limit.
  17         mlist.post_list_limit = 0
  18     if not hasattr(mlist, 'post_period'):
  19         # To set the time period, set the following.
  20         #  <=0 -> current day
  21         #   >0 -> number of hours
  22         mlist.post_period = 0

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2015-06-19 00:27:14, 4.6 KB) [[attachment:PostLimit.py]]
  • [get | view] (2016-05-26 06:04:57, 0.8 KB) [[attachment:extend.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.