[Mailman-Users] Is it possible to add the Description field on thelist create web interface?

Brian Ensor brian.ensor at deri.org
Wed Feb 23 12:59:06 CET 2005

Thanks for the reply.  I have moved a little forward on this problem as

I do want to make the description field mandatory on list creation, so
modifying the Mailman/Cgi/create.py is most likely the route I would like to

In viewing the config and determining the changes to be made, I would be
editing as follows:

def process_request(doc, cgidata):
    # Lowercase the listname since this is treated as the "internal" name.
    listname = cgidata.getvalue('listname', '').strip().lower()
    owner    = cgidata.getvalue('owner', '').strip()
    # Added following line to support description field
    description = cgidata.getvalue('description', '').strip()

# Sanity Check
    # Added following line to support description field
    if not description:
        request_creation(doc, cgidata,
                         _('You forgot to specify the list description'))

# And send the notice to the list owner.
       # Added description to mlist 
       text = Utils.maketext(
            {'listname'    : listname,
             'password'    : password,
             'admin_url'   : mlist.GetScriptURL('admin', absolute=1),
             'listinfo_url': mlist.GetScriptURL('listinfo', absolute=1),
             'requestaddr' : mlist.GetRequestEmail(),
             'siteowner'   : siteadmin,
             'description' : description,
             }, mlist=mlist)

# in Dummy section modify page text to indicate requirement for description
    <p>You also need to enter the email address of the initial list owner
    a brief description of the list. Once the list is created, the list
    will be given notification, along with the initial list password.  The
    list owner will then be able to modify the password and add or remove
    additional list owners.

# Also in Dummy section
    safedescription = Utils.websafe(cgidata.getvalue('description', ''))
    ftable.AddRow([Label(_('Brief description of list:')),
                   TextBox('description', safedescription)])
    ftable.AddCellInfo(ftable.GetCurrentRowIndex(), 0, bgcolor=GREY)
    ftable.AddCellInfo(ftable.GetCurrentRowIndex(), 1, bgcolor=GREY)

I am not sure if the information above is 100% correct, but I believe it is.
The part that is not addressed above is the actual list creation.  This is
called by mlist.Create, which I believe is from the /Mailman/MailList.py
file.  Here is how I believe the call should be done in create.py to
accomplish what I want:

                # Added description to this command line
                mlist.Create(listname, owner, pw, langs, emailhost,

Now that I am passing another parameter, how can I ensure it is handled
correctly?  Will there be some changes required in MailList.py or another
file to make sure the field is handled correctly?  Is description the
correct name to use?

I know this may be now getting into something that may need to be submitted
to the developers list, but I am not a programmer and figured this list
would be the one to start on.

Thanks in advance for any help.


> -----Original Message-----
> From: Mark Sapiro [mailto:msapiro at value.net] 
> Sent: 22 February 2005 18:42
> To: brian.ensor at deri.org; mailman-users at python.org
> Subject: Re: [Mailman-Users] Is it possible to add the 
> Description field on thelist create web interface?
> Brian Ensor wrote:
> >
> >We have an issue with lists being created and having to rely on the
> >list admins to input a list description.  We would like to have the
> >list creator be able to input the list name and description 
> when using
> >the web interface.  Is there a way to modify this
> >'http://<yourserver>/mailman/create' page to include this at the time
> >of creation?
> Not without modifying the Mailman/Cgi/create.py module which produces
> and processes the page.
> The alternative is for the list creator to go immediately to the list
> admin pages and set real_name and description. Granted, this is not as
> convenient as having it on the create page and is not "enforceable",
> but it's the best you can do without hacking create.py.
> --
> Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
> San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list