Django REST framework additional pagination
Project description
drf-paginations
Other paginations based on Django REST framework
- Author: xcai
- Version: 1.0.0
- License: MIT
drf-paginations is a collections of paginations for Django REST framework. includes: LimitOffsetPaginationForDataTable...
drf-paginations 增加适配前端Datatable表格组件的limitoffset分页器,例如LimitOffsetPaginationForDataTable
Documentation
- Install drf-paginations from PyPI(安装):
pip install drf-paginations
- Import the pagination class into your project(使用):
from drf_pagination.pagination import LimitOffsetPaginationForDataTable
from rest_framework.generics import ListAPIView
class MyStoryListAPIView(ListAPIView):
...
pagination_class = LimitOffsetPaginationForDataTable
- Response format data(接口返回数据格式,适配Datatable):
{
"draw": 1,
"recordsTotal": 100,
"recordsFiltered": 10,
"data": [
{...},
{...}
]}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
drf_pagination-1.0.0.tar.gz
(2.6 kB
view details)
Built Distribution
File details
Details for the file drf_pagination-1.0.0.tar.gz
.
File metadata
- Download URL: drf_pagination-1.0.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-45-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1c7f39f0c6c61012195f4e71f20173f7c0fe9b18cfce56020d58c06ad641a60 |
|
MD5 | 67c5412cd3b4af1ff4c52085930c269e |
|
BLAKE2b-256 | 6dd45185f26ff20bf6999b1484f104b033356fec4cd6fbf1f960aad7a655f088 |
File details
Details for the file drf_pagination-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: drf_pagination-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-45-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 149ea9d8d5cc70f081dc69f0590abaaaaabe01f2b27f79ec707e6ef3b6fda6b7 |
|
MD5 | 0a8431cf3a16a7c4535ec3db4de6f18d |
|
BLAKE2b-256 | acd27a3e6e3978ebe921b752a61164098b63400b92b4063731cd2deb71a69996 |