[Mailman-Users] hide lists from listinfo page only (leave onadmin page)
Xiaoyan Ma
xma at uclink.berkeley.edu
Mon Oct 10 05:24:13 CEST 2005
On Fri, 7 Oct 2005 10:12:48 -0700
Mark Sapiro <msapiro at value.net> wrote:
>>
>>.....
>>for name in listnames:(but not in notshowns)
>
Thank you. I just started learning python, so I wanted to find out if I am on the right track
first. I have spent 2 hours on these few lines of code, but have not got it to work yet. I tried
to run the listinfo.py file alone to debug and got the following message (either running the
original file that came with the package or what I have modified):
python /var/mailman/Mailman/Cgi/listinfo.py
Traceback (most recent call last):
File "/var/mailman/Mailman/Cgi/listinfo.py", line 25, in ?
from Mailman import mm_cfg
ImportError: No module named Mailman
What did I miss?
>
> Presumably this is pseudocode. It's not Python. Python might be
>
> for name in listnames:
> if name in notshowns:
> continue
>
>
>> mlist = MailList.MailList(name, lock=0)
>> if mlist.advertised:
>> if mm_cfg.VIRTUAL_HOST_OVERVIEW
>> mlist.web_page_url.find(hostname) == -1:
>> # List is for different identity of this host - skip it.
>> continue
>> else:
>> advertised.append((mlist.GetScriptURL('listinfo'),
>> mlist.real_name,
>> mlist.description))
>>...
> There may be other ways to do this that don't require maintenance of a
> separate list. E.g., you could modify admin.py to display all lists
> regardless of the setting of advertised. Then lists with advertised
> set to No would be displayed on the admin overview but not the
> listinfo overview.
This is a great idea, I will test it out as well.
>
> Also, what is the goal? If it is simply to avoid 'clutter' on the
> listinfo overview but still allow 'one click' access to the admin
> page, then you may be on the right track, but if you are trying to
> actually 'hide' the existence or name of the lists, anyone can go to
> the admin overview page and see them.
>
Tha goal is to avoid clutter and subscription attempts. I think modify the admin.py file as you
suggested might be a better option. Maybe require authentication to access the admin page.
Thanks a lot.
Xiaoyan
More information about the Mailman-Users
mailing list