Stephen Turnbull has proposed merging
lp:~stephen-xemacs/postorius/domain-not-list into lp:postorius.
Requested reviews:
Mailman Coders (mailman-coders)
For more details, see:
https://code.launchpad.net/~stephen-xemacs/postorius/domain-not-list/+merge/154558
This changes the Postorius settings file to use the same Mailman 3 credential
variables that HyperKitty does (REST_SERVER->MAILMAN_API_URL,
API_USER->MAILMAN_USER, API_PASS->MAILMAN_PASS), and updates the uses of these
variables.
Florian thought it was a good idea at the time....
--
https://code.launchpad.net/~stephen-xemacs/postorius/domain-not-list/+merge/154558
Your team Mailman Coders is requested to review the proposed merge of
lp:~stephen-xemacs/postorius/domain-not-list into lp:postorius.
=== modified file 'src/postorius/management/commands/mmclient.py'
--- src/postorius/management/commands/mmclient.py 2012-09-30 14:54:41 +0000
+++ src/postorius/management/commands/mmclient.py 2013-03-21 00:12:28 +0000
@@ -44,7 +44,7 @@
shell = code.InteractiveConsole(globals())
console_fn = shell.interact
# connect to mailmanclient
- client = Client('%s/3.0' % settings.REST_SERVER,
- settings.API_USER, settings.API_PASS)
+ client = Client('%s/3.0' % settings.MAILMAN_API_URL,
+ settings.MAILMAN_USER, settings.MAILMAN_PASS)
# run the interpreter
console_fn()
=== modified file 'src/postorius/models.py'
--- src/postorius/models.py 2013-03-17 18:15:36 +0000
+++ src/postorius/models.py 2013-03-21 00:12:28 +0000
@@ -48,8 +48,8 @@
"""
def __init__(self, resource_name, resource_name_plural, cls_name=None):
- self.client = Client('%s/3.0' % settings.REST_SERVER,
- settings.API_USER, settings.API_PASS)
+ self.client = Client('%s/3.0' % settings.MAILMAN_API_URL,
+ settings.MAILMAN_USER, settings.MAILMAN_PASS)
self.resource_name = resource_name
self.resource_name_plural = resource_name_plural
=== modified file 'src/postorius/views/api.py'
--- src/postorius/views/api.py 2012-12-15 14:17:14 +0000
+++ src/postorius/views/api.py 2013-03-21 00:12:28 +0000
@@ -54,8 +54,8 @@
@basic_auth_login
@loggedin_or_403
def api_list_index(request):
- client = Client('%s/3.0' % settings.REST_SERVER,
- settings.API_USER, settings.API_PASS)
+ client = Client('%s/3.0' % settings.MAILMAN_API_URL,
+ settings.MAILMAN_USER, settings.MAILMAN_PASS)
res, content = client._connection.call('lists')
return HttpResponse(json.dumps(content['entries']),
content_type="application/json")
=== modified file 'src/postorius/views/generic.py'
--- src/postorius/views/generic.py 2013-03-19 20:57:48 +0000
+++ src/postorius/views/generic.py 2013-03-21 00:12:28 +0000
@@ -100,8 +100,8 @@
return self.lists[list_id]
def _get_memberships(self):
- client = Client('%s/3.0' % settings.REST_SERVER,
- settings.API_USER, settings.API_PASS)
+ client = Client('%s/3.0' % settings.MAILMAN_API_URL,
+ settings.MAILMAN_USER, settings.MAILMAN_PASS)
memberships = []
if (self.mm_user):
for a in self.mm_user.addresses:
=== modified file 'src/postorius/views/settings.py'
--- src/postorius/views/settings.py 2012-12-15 23:25:29 +0000
+++ src/postorius/views/settings.py 2013-03-21 00:12:28 +0000
@@ -95,8 +95,8 @@
"""
if request.method == 'POST':
try:
- client = Client(settings.REST_SERVER + '/3.0', settings.API_USER,
- settings.API_PASS)
+ client = Client(settings.MAILMAN_API_URL + '/3.0', settings.MAILMAN_USER,
+ settings.MAILMAN_PASS)
client.delete_domain(domain)
messages.success(request,
_('The domain %s has been deleted.' % domain))
=== modified file 'src/postorius/views/user.py'
--- src/postorius/views/user.py 2012-12-15 19:49:42 +0000
+++ src/postorius/views/user.py 2013-03-21 00:12:28 +0000
@@ -70,8 +70,8 @@
membership_lists = []
try:
- c = Client('%s/3.0' % settings.REST_SERVER, settings.API_USER,
- settings.API_PASS)
+ c = Client('%s/3.0' % settings.MAILMAN_API_URL, settings.MAILMAN_USER,
+ settings.MAILMAN_PASS)
if tab == "membership":
if fqdn_listname:
the_list = List.objects.get(fqdn_listname=fqdn_listname)
_______________________________________________
Mailman-coders mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-coders