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.' }