diff --git a/templates/mailman-django/lists/index.html b/templates/mailman-django/lists/index.html index 6c8c089..48e1924 100644 --- a/templates/mailman-django/lists/index.html +++ b/templates/mailman-django/lists/index.html @@ -9,8 +9,7 @@ {% trans "Real Name" %} {% trans "List Name" %} -   -   +   {% for list in lists %} @@ -20,6 +19,9 @@ Info / Subscribe + + Settings + Delete list diff --git a/views.py b/views.py index 72f188f..ab48763 100644 --- a/views.py +++ b/views.py @@ -24,6 +24,7 @@ import re from mailmanclient.rest import MailmanRESTClient, MailmanRESTClientError from forms import * +from settings import API_USER, API_PASS def login_required(fn): """ @@ -90,7 +91,7 @@ if form.is_valid(): listname = form.cleaned_data['listname'] try: - c = MailmanRESTClient('localhost:8001') + c = MailmanRESTClient('localhost:8001', API_USER, API_PASS) except Exception, e: return HttpResponse(e) @@ -120,7 +121,7 @@ """Show a table of all mailing lists. """ try: - c = MailmanRESTClient('localhost:8001') + c = MailmanRESTClient('localhost:8001', API_USER, API_PASS) except MailmanRESTClientError, e: return render_to_response('mailman-django/errors/generic.html', {'message': e}) @@ -142,7 +143,7 @@ user to fill in which are evaluated in this function. """ try: - c = MailmanRESTClient('localhost:8001') + c = MailmanRESTClient('localhost:8001', API_USER, API_PASS) the_list = c.get_list(fqdn_listname) except Exception, e: return HttpResponse(e) @@ -209,7 +210,7 @@ # create a connection to Mailman and get the list try: - c = MailmanRESTClient('localhost:8001') + c = MailmanRESTClient('localhost:8001', API_USER, API_PASS) the_list = c.get_list(fqdn_listname) except Exception, e: return HttpResponse(e) @@ -235,7 +236,7 @@ """ message = "" try: - c = MailmanRESTClient('localhost:8001') + c = MailmanRESTClient('localhost:8001', API_USER, API_PASS) the_list = c.get_list(fqdn_listname) except Exception, e: return HttpResponse(e) @@ -260,7 +261,7 @@ """ message = "" try: - c = MailmanRESTClient('localhost:8001') + c = MailmanRESTClient('localhost:8001', API_USER, API_PASS) the_list = c.get_list(fqdn_listname) except Exception, e: return HttpResponse(e) @@ -306,7 +307,7 @@ membership_lists = [] listname = "" try: - c = MailmanRESTClient('localhost:8001') + c = MailmanRESTClient('localhost:8001', API_USER, API_PASS) user_object = c.get_user(member) # address_choices for the 'address' field must be a list of # tuples of length 2