mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-07 13:54:47 +03:00
Update pagination.md
This commit is contained in:
parent
5f24aeb829
commit
a5208e8c12
|
@ -96,10 +96,9 @@ Let's modify the built-in `PageNumberPagination` style, so that instead of inclu
|
|||
```py
|
||||
from rest_framework.pagination import PageNumberPagination
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.utils.urls import remove_query_param, replace_query_param
|
||||
|
||||
|
||||
class LinkHeaderPagination(pagination.PageNumberPagination):
|
||||
class LinkHeaderPagination(PageNumberPagination):
|
||||
def get_paginated_response(self, data):
|
||||
headers = {
|
||||
'X-Page': self.page.number,
|
||||
|
|
Loading…
Reference in New Issue
Block a user