[Patchew-devel] [PATCH 02/11] rest: switch pagination to limit/offset

Paolo Bonzini posted 11 patches 5 years, 12 months ago
[Patchew-devel] [PATCH 02/11] rest: switch pagination to limit/offset
Posted by Paolo Bonzini 5 years, 12 months ago
This will come in handy to fetch only one unapplied series in the
importer.
---
 patchew/settings.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/patchew/settings.py b/patchew/settings.py
index 4e10b44..c5b5295 100644
--- a/patchew/settings.py
+++ b/patchew/settings.py
@@ -68,7 +68,7 @@ REST_FRAMEWORK = {
         'rest_framework.authentication.TokenAuthentication',
         'rest_framework.authentication.SessionAuthentication',
     ),
-    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
+    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
     'URL_FIELD_NAME': 'resource_uri',
     'PAGE_SIZE': 50,
     'UPLOADED_FILES_USE_URL': True,
-- 
2.21.0


_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel