Skip to content

Commit 0d6ffc9

Browse files
committed
Add pagination for both list views: users and snippets
1 parent aa409c8 commit 0d6ffc9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Binary file not shown.

tutorial5/tutorial1/settings.py

+7
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@
4242
'snippets.apps.SnippetsConfig',
4343
]
4444

45+
46+
REST_FRAMEWORK = {
47+
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
48+
'PAGE_SIZE': 10
49+
}
50+
51+
4552
MIDDLEWARE = [
4653
'django.middleware.security.SecurityMiddleware',
4754
'django.contrib.sessions.middleware.SessionMiddleware',

0 commit comments

Comments
 (0)