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

Paolo Bonzini pbonzini at redhat.com
Wed May 15 12:57:59 UTC 2019


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





More information about the Patchew-devel mailing list