[Mailman-Users] Customizing main listinfo page?

Nigel Kersten nigel at cofa.unsw.edu.au
Mon Jan 7 04:04:13 CET 2002


Ok, so it's apparently ok for me to customise this page, and I'll get warned
when I upgrade.

Now for another question... ;) that possibly belongs more on the Dev list,
but here goes...


I'd like to merge my listinfo page into the rest of my site, so I'd like to
use style sheets... My only problem is that I can't see how on earth I can
insert anything before the </HEAD> tag in the Document() call in the
listinfo page... ?

The relevant bit seems to be in htmlformat.py, here...

class Document(Container):
    title = None

    def SetTitle(self, title):
        self.title = title
   
    def Format(self, indent=0, **kws):
        tab = ' ' * indent
        output = ['Content-type: text/html',
                  '',
                  tab,
                  '<HTML>',
                  '<HEAD>'
                  ]
        if self.title:
            output.append('%s<TITLE>%s</TITLE>' % (tab, self.title))
        output.append('%s</HEAD>' % tab)
        output.append('%s<BODY' % tab)



I guess I could just hack it and add something to insert data before this,
but this definitely seems like bad form to go messing with this module... ?



Nigel





On 7/1/02 1:13 PM, "Nigel Kersten" <nigel at cofa.unsw.edu.au> wrote:

> (Disclaimer: have tried searching the archives, but 'listinfo' is a
> singularly unproductive search term, due to the footer... :)
> 
> 
> I'd like to customize the main listinfo page, the one showing all the lists
> on the host. I don't really know python (yet) but I can easily see what the
> listinfo.py file is doing, and if I make changes there, they get reflected
> in the page.
> 
> This doesn't seem like the direction I want to take, as it seems likely that
> future upgrades of Mailman may wipe out my changes, so I guess I want to
> copy the listinfo.py script to a new file and start again.
> 
> My question is, how on earth does this work? When I go to the URL
> http://www.mysite.com/mailman/listinfo that is actually referring to the
> /usr/local/mailman/cgi-bin/listinfo binary, right?
> 
> Is this a compiled python file? Like .pyc files?
> 
> The listinfo.pyc and the listinfo file in the cgi-bin aren't the same file
> from their sizes, so I'm just wondering how this works, I assume the second
> file calls the listinfo.py file somehow... ?
> 
> Anyway, I'm about to go searching through the python.org site to get a
> better grip on all this, but I guess I was just wondering if anyone had any
> simple suggestions for coming up with an alternative listinfo page...
> 
> 
> Cheers,
> 
> 
> nigel


--
N i g e l   K e r s t e n |  College of Fine Arts,
[Systems Administrator]   |  Uni.of.NSW.Sydney.Australia.
nigel at cofa.unsw.edu.au    |  ph.9385 0672:fax.9385 0624

"It's like a jungle sometimes, it makes me wonder,
how I keep from going under" - Grandmaster Flash.





More information about the Mailman-Users mailing list