summaryrefslogtreecommitdiff
path: root/Mailman/Cgi/listinfo.py
diff options
context:
space:
mode:
authorBarry Warsaw2007-07-14 21:23:28 -0400
committerBarry Warsaw2007-07-14 21:23:28 -0400
commit327865eaf118f40063366acad9c7d97487e010d6 (patch)
treeeda494bb7560b1427813ae7ec51a22e3d0444703 /Mailman/Cgi/listinfo.py
parent288ae405b09baa443eb1b39422c48c315fbb2e5a (diff)
downloadmailman-327865eaf118f40063366acad9c7d97487e010d6.tar.gz
mailman-327865eaf118f40063366acad9c7d97487e010d6.tar.zst
mailman-327865eaf118f40063366acad9c7d97487e010d6.zip
Other than contrib files, convert all imports of mm_cfg to imports of config.
Ignore mailman.egg-info In bin/make_instance.py: Catch and ignore import errors when importing Mailman.i18n. Before this script has actually been run, there won't be enough infrastructure in place of the import to succeed. Include several other fixes in this file. Add install_requires to the setup script.
Diffstat (limited to 'Mailman/Cgi/listinfo.py')
-rw-r--r--Mailman/Cgi/listinfo.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Mailman/Cgi/listinfo.py b/Mailman/Cgi/listinfo.py
index 13689b767..72ef6bfa9 100644
--- a/Mailman/Cgi/listinfo.py
+++ b/Mailman/Cgi/listinfo.py
@@ -24,15 +24,15 @@ import cgi
import logging
from Mailman import Errors
-from Mailman import i18n
from Mailman import MailList
-from Mailman import mm_cfg
from Mailman import Utils
+from Mailman import i18n
+from Mailman.configuration import config
from Mailman.htmlformat import *
# Set up i18n
_ = i18n._
-i18n.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE)
+i18n.set_language(config.DEFAULT_SERVER_LANGUAGE)
log = logging.getLogger('mailman.error')
@@ -70,7 +70,7 @@ def listinfo_overview(msg=''):
# Set up the document and assign it the correct language. The only one we
# know about at the moment is the server's default.
doc = Document()
- doc.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE)
+ doc.set_language(config.DEFAULT_SERVER_LANGUAGE)
legend = _("%(hostname)s Mailing Lists")
doc.SetTitle(legend)
@@ -78,7 +78,7 @@ def listinfo_overview(msg=''):
table = Table(border=0, width="100%")
table.AddRow([Center(Header(2, legend))])
table.AddCellInfo(table.GetCurrentRowIndex(), 0, colspan=2,
- bgcolor=mm_cfg.WEB_HEADER_COLOR)
+ bgcolor=config.WEB_HEADER_COLOR)
# Skip any mailing lists that isn't advertised.
advertised = []
@@ -98,7 +98,7 @@ def listinfo_overview(msg=''):
greeting = FontAttr(_('Welcome!'), size='+2')
welcome = [greeting]
- mailmanlink = Link(mm_cfg.MAILMAN_URL, _('Mailman')).Format()
+ mailmanlink = Link(config.MAILMAN_URL, _('Mailman')).Format()
if not advertised:
welcome.extend(
_('''<p>There currently are no publicly-advertised
@@ -138,9 +138,9 @@ def listinfo_overview(msg=''):
table.AddRow(
[Link(url, Bold(real_name)),
description or Italic(_('[no description available]'))])
- if highlight and mm_cfg.WEB_HIGHLIGHT_COLOR:
+ if highlight and config.WEB_HIGHLIGHT_COLOR:
table.AddRowInfo(table.GetCurrentRowIndex(),
- bgcolor=mm_cfg.WEB_HIGHLIGHT_COLOR)
+ bgcolor=config.WEB_HIGHLIGHT_COLOR)
highlight = not highlight
doc.AddItem(table)