Barry Warsaw pushed to branch master at mailman / Mailman

Commits:
bd8b1d5f by Barry Warsaw at 2015-11-06T14:17:40Z
* Add NEWS and a missing _all__ key.
* Wrap paragraph.

- - - - -


2 changed files:

- src/mailman/docs/NEWS.rst
- src/mailman/rest/helpers.py


Changes:

=====================================
src/mailman/docs/NEWS.rst
=====================================
--- a/src/mailman/docs/NEWS.rst
+++ b/src/mailman/docs/NEWS.rst
@@ -91,6 +91,8 @@ REST
    server owners as `IUser`s.  (Closes #135)
  * By POSTing to a user resource with an existing unlinked address, you can
    link the address to the user.  Given by Abhilash Raj.
+ * Fix pagination values `start` and `total_size` in the REST API.  Given by
+   Aurélien Bompard.  (Closes: #154)
 
 Other
 -----


=====================================
src/mailman/rest/helpers.py
=====================================
--- a/src/mailman/rest/helpers.py
+++ b/src/mailman/rest/helpers.py
@@ -20,6 +20,7 @@
 __all__ = [
     'BadRequest',
     'ChildError',
+    'CollectionMixin',
     'GetterSetter',
     'NotFound',
     'bad_request',
@@ -148,10 +149,11 @@ class CollectionMixin:
     def _paginate(self, request, collection):
         """Method to paginate through collection result lists.
 
-        Use this to return only a slice of a collection, specified in the 
request
-        itself.  The request should use query parameters `count` and `page` to
-        specify the slice they want.  The slice will start at index
-        ``(page - 1) * count`` and end (exclusive) at ``(page * count)``.
+        Use this to return only a slice of a collection, specified in
+        the request itself.  The request should use query parameters
+        `count` and `page` to specify the slice they want.  The slice
+        will start at index ``(page - 1) * count`` and end (exclusive)
+        at ``(page * count)``.
         """
         # Allow falcon's HTTPBadRequest exceptions to percolate up.  They'll
         # get turned into HTTP 400 errors.



View it on GitLab: 
https://gitlab.com/mailman/mailman/commit/bd8b1d5f0e7c9d89ab7e68cd361450dd18a24ae3
_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to