* css changes
* typo fixes
* markup changes
1 parent 940f9e7 commit 5104a7332b2e67a71735439b357b437ff0f85ec9
@root root authored on 10 Nov 2011
Showing 11 changed files
View
24
context_processors.py
from mailman.client import Client
from settings import API_USER, API_PASS, MAILMAN_THEME
from mailmanweb.settings import API_USER, API_PASS, MAILMAN_THEME
from django.utils.translation import gettext as _
from urllib2 import HTTPError
 
def lists_of_domain(request):
domainname = None
message = ""
if "HTTP_HOST" in request.META.keys() :#TODO only lists of current domains if possible
#get the URL
web_host = request.META["HTTP_HOST"].split(":")[0]
web_host = ('http://%s' % request.META["HTTP_HOST"].split(":")[0])
domainname = "unregistered Domain"
#querry the Domain object
try:
c = Client('http://localhost:8001/3.0', API_USER, API_PASS)
try:
d = c.get_domain(None,web_host)
#workaround LP:802971 - only lists of the current domain #todo a8
domainname= d.email_host
for list in c.lists:
if list.host_name == domainname:
domain_lists.append(list)
except HTTPError, e:
domain_lists = c.lists
message = str(e.code) + _(" - Accesing from an unregistered Domain - showing all lists")
except AttributeError, e:
message="REST API not found / Offline"
try:
d = c.get_domain(web_host=web_host)
#workaround LP:802971 - only lists of the current domain #todo a8
domainname= d.mail_host
for list in c.lists:
if list.mail_host == domainname:
domain_lists.append(list)
except HTTPError, e:
domain_lists = c.lists
message = str(e.code) + _(" - Accesing from an unregistered Domain - showing all lists")
 
#return a Dict with the key used in templates
return {"lists":domain_lists,"domain":domainname, "message":message}
View
4
forms.py
required = False,
)
#Descriptions used in the Settings Overview Page
section_descriptions = {
"List Indentity":_("General List settings use"),
"List Identity":_("General List settings use"),
"Automatic Responses":_("All options for Autoreply"),
"Content Filtering":_("Decide how incoming mails might be filtered"),
"Digest": _("Modify and check some Digest options"),
"Privacy" : _("Check the lists privacy standards"),
the fields that should be included in the fieldset.
"""
# just a really temporary layout to see that it works. -- Anna
layout = [
["List Indentity", "real_name", "include_list_post_header",
["List Identity", "real_name", "include_list_post_header",
"include_rfc2369_headers"],
#"info", "list_name", "host_name", "list_id", "fqdn_listname",
#"http_etag", "volume", "web_host"
["Automatic Responses", "autorespond_owner",
View
media/mailman_django/default/css/forms.css
View
media/mailman_django/default/css/style.css
View
templates/mailman-django/base.html
View
templates/mailman-django/domain_index.html
View
templates/mailman-django/list_selector.html
View
templates/mailman-django/lists/index.html
View
templates/mailman-django/lists/settings.html
View
templates/mailman-django/lists/summary.html
View
views.py