From 5e082314535d2f18c7596b7451de6b800ac37f71 Mon Sep 17 00:00:00 2001 From: Xavier Ordoquy Date: Wed, 17 Feb 2016 18:18:19 +0100 Subject: [PATCH] Remove informations about why the pagination didn't work. We remove a couple of informations to lower the exposition of our internals. --- rest_framework/pagination.py | 2 +- tests/test_pagination.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rest_framework/pagination.py b/rest_framework/pagination.py index 1051dc5b2..de8777b96 100644 --- a/rest_framework/pagination.py +++ b/rest_framework/pagination.py @@ -186,7 +186,7 @@ class PageNumberPagination(BasePagination): template = 'rest_framework/pagination/numbers.html' - invalid_page_message = _('Invalid page "{page_number}": {message}.') + invalid_page_message = _('Invalid page.') def paginate_queryset(self, queryset, request, view=None): """ diff --git a/tests/test_pagination.py b/tests/test_pagination.py index c6caaf641..1c74e837c 100644 --- a/tests/test_pagination.py +++ b/tests/test_pagination.py @@ -113,7 +113,7 @@ class TestPaginationIntegration: response = self.view(request) assert response.status_code == status.HTTP_404_NOT_FOUND assert response.data == { - 'detail': 'Invalid page "0": That page number is less than 1.' + 'detail': 'Invalid page.' } def test_404_not_found_for_invalid_page(self): @@ -121,7 +121,7 @@ class TestPaginationIntegration: response = self.view(request) assert response.status_code == status.HTTP_404_NOT_FOUND assert response.data == { - 'detail': 'Invalid page "invalid": That page number is not an integer.' + 'detail': 'Invalid page.' }