diff --git a/src/mailmanweb/models.py b/src/mailmanweb/models.py index 1fab6d9..54926a9 100644 --- a/src/mailmanweb/models.py +++ b/src/mailmanweb/models.py @@ -44,7 +44,6 @@ """ def __init__(self, resource_name, resource_name_plural, cls_name=None): - logger.debug(cls_name) self.client = Client('%s/3.0' % settings.REST_SERVER, settings.API_USER, settings.API_PASS) self.resource_name = resource_name @@ -151,3 +150,13 @@ objects = MailmanListManager() +class User(MailmanRestModel): + """User model class. + """ + objects = MailmanRestManager('user', 'users') + + +class Member(MailmanRestModel): + """Member model class. + """ + objects = MailmanRestManager('member', 'members') diff --git a/src/mailmanweb/views.py b/src/mailmanweb/views.py index 354fd03..773d945 100644 --- a/src/mailmanweb/views.py +++ b/src/mailmanweb/views.py @@ -34,7 +34,7 @@ from django.template import Context, loader, RequestContext from django.utils.translation import gettext as _ from mailman.client import Client -from models import Domain, List, MailmanApiError +from models import Domain, List, Member, User, MailmanApiError, Mailman404Error from forms import * from urllib2 import HTTPError @@ -53,7 +53,6 @@ def domain_index(request): try: existing_domains = Domain.objects.all() - logger.debug(Domain.objects) except MailmanApiError: return utils.render_api_error(request) return render_to_response('mailmanweb/domain_index.html', {'domains':existing_domains,},