diff options
| author | Barry Warsaw | 2015-07-19 15:40:07 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2015-07-19 15:40:07 +0000 |
| commit | d903aa4ba57dc19699972bf22b7874edd90434a8 (patch) | |
| tree | 32fa44f854cf762b156c93ecba1a63be43e454c5 /src/mailman/rest/lists.py | |
| parent | fddfcbde937f61657bb29253609b63670beaae46 (diff) | |
| parent | 5a08c47353cefccaa021e0f488ab76f3806dd49c (diff) | |
| download | mailman-d903aa4ba57dc19699972bf22b7874edd90434a8.tar.gz mailman-d903aa4ba57dc19699972bf22b7874edd90434a8.tar.zst mailman-d903aa4ba57dc19699972bf22b7874edd90434a8.zip | |
Merge branch 'api' into 'master'
REST API version 3.1 introduced.
Mostly backward compatible with version 3.0 except that UUIDs are represented as hex strings instead of 128-bit integers, since the latter are not compatible with all versions of JavaScript.
See merge request !28
Diffstat (limited to 'src/mailman/rest/lists.py')
| -rw-r--r-- | src/mailman/rest/lists.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mailman/rest/lists.py b/src/mailman/rest/lists.py index 0607102cb..a17946738 100644 --- a/src/mailman/rest/lists.py +++ b/src/mailman/rest/lists.py @@ -40,7 +40,7 @@ from mailman.interfaces.subscriptions import ISubscriptionService from mailman.rest.listconf import ListConfiguration from mailman.rest.helpers import ( CollectionMixin, GetterSetter, NotFound, bad_request, child, created, - etag, no_content, not_found, okay, paginate, path_to) + etag, no_content, not_found, okay, paginate) from mailman.rest.members import AMember, MemberCollection from mailman.rest.post_moderation import HeldMessages from mailman.rest.sub_moderation import SubscriptionRequests @@ -109,7 +109,7 @@ class _ListBase(CollectionMixin): mail_host=mlist.mail_host, member_count=mlist.members.member_count, volume=mlist.volume, - self_link=path_to('lists/{0}'.format(mlist.list_id)), + self_link=self.path_to('lists/{0}'.format(mlist.list_id)), ) @paginate @@ -213,7 +213,8 @@ class AllLists(_ListBase): except ValueError as error: bad_request(response, str(error)) else: - created(response, path_to('lists/{0}'.format(mlist.list_id))) + location = self.path_to('lists/{0}'.format(mlist.list_id)) + created(response, location) def on_get(self, request, response): """/lists""" |
