From edfcbe076d61a36506293a378c7ab5c20345345d Mon Sep 17 00:00:00 2001 From: Tamirlan Omarov Date: Mon, 21 May 2018 15:32:07 +0300 Subject: [PATCH] Added pagination section to the quickstart page (#5987) --- docs/tutorial/quickstart.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/tutorial/quickstart.md b/docs/tutorial/quickstart.md index 35d5642c7..466baeebc 100644 --- a/docs/tutorial/quickstart.md +++ b/docs/tutorial/quickstart.md @@ -132,6 +132,14 @@ Again, if we need more control over the API URLs we can simply drop down to usin Finally, we're including default login and logout views for use with the browsable API. That's optional, but useful if your API requires authentication and you want to use the browsable API. +## Pagination +Pagination allows you to control how many objects per page are returned. To enable it add following lines to the `tutorial/settings.py` + + REST_FRAMEWORK = { + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', + 'PAGE_SIZE': 10 + } + ## Settings Add `'rest_framework'` to `INSTALLED_APPS`. The settings module will be in `tutorial/settings.py`