Filter and Pagination in Django
Project description
Filter & Pagination in Django
- Filter your result-set
- Paginate your result-set as per object you want in your response
- It's a open source service.
- Easy to implement
- Fastest execution & High performance
Install with pip
pip install filter-and-pagination
How to implement
- import FilterPagination
from filter_and_pagination import FilterPagination
- Used in
FilterPagination.filter_and_pagination(request, ModelRefrence)
Demo
Request:
- URL: http://127.0.0.1:8000/customers/api/v1/?name=jasmin
- Method: GET
Response:
{
"status_code": 200,
"status": "success",
"message": [
"Customer data retrieved successfully."
],
"data": {
"dataset": [{
"id": 166,
"name": "Jasmin",
"full_name": "Jasmin Perry",
"email": "nicolemathews@smith-anderson.net",
"contact_no_dail_code": "186",
"contact_no": "9831999092",
"dob": "1936-07-27",
"gender": 1,
"address": "466 Zuniga Trail Suite 955\nLake Brandonside, AL 22894",
"extra": {},
"created_at": "2020-01-11T10:09:24.780734Z",
"updated_at": "2020-01-11T10:09:24.780745Z"
}],
"pagination": {
"per_page": 20,
"current_page": 1,
"total_count": 1,
"total_pages": 1
}
}
}
PyPi
- Project: filter-and-pagination
- link: https://pypi.org/project/filter-and-pagination/
GitHub
- Project: filter-pagination-dj
- link: https://github.com/ashish1997it/filter-pagination-dj
PostMan
- Collection: filter-and-pagination-in-GH-proj
- link: https://www.getpostman.com/collections/eae09a934fbc284bc062
Medium
- Artical: Filter & Pagination in Django
- link: https://medium.com/@sondagarashish/filter-and-pagination-in-django-c0a61ff5f5c4
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
Built Distribution
Close
Hashes for filter_and_pagination-1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39f05ba13ef0bc2548118aaaf9796b8aa98d23ee569a75084a41defcd83d3141 |
|
MD5 | f58b862ff65116cbfead39816d3ed874 |
|
BLAKE2b-256 | 85f429bef53fa6081871a5360d74bf303ef408066e85f7c3991dcd0c2a6fe342 |
Close
Hashes for filter_and_pagination-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c9482a6a99cd427b8949f2e59b33e15f99c6b2fc7e2bafde722aecd0c5ae280 |
|
MD5 | 04bb0f961b45d1ae882ac9029d01c07e |
|
BLAKE2b-256 | 3c26f601d7989a3d12f23bd254b4ba9721f0a8c6bcece7bfdbc742e771c9be29 |