Custom paginations for Django REST Framework
Project description
Custom paginations for django rest framework
Compatibility
- work with :
Python 2.7 / 3.4
Dango 1.6 / 1.7
Django Rest Framework 2.4 / 3.0
Installation
Install the package from pypi:
pip install djangorestframework-custom-paginations
Add the application in your django settings:
DJANGO_APPS = ('rest_framework_custom_paginations',)
Configure your rest framework :
REST_FRAMEWORK = { 'DEFAULT_PAGINATION_SERIALIZER_CLASS': 'rest_framework_custom_paginations.paginations.SporePaginationSerializer' }
Example
Results of Spore Pagination :
{ "count": 532, "next": "http://myurls/persons.json?structure=mystructure&page=3", "next_params": { "page": 3, "structure": "mystructure" }, "num_pages": 6, "previous": "http://myurls/persons.json?structure=mystructure&page=1", "previous_params": { "page": 1, "structure": "mystructure" }, "results": [ ... ] }
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for djangorestframework-custom-paginations-1.0.0.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5207490c1508aefee2d3abfb3339cbf4214e9c3721c12ff4fe44484fe6297fb0 |
|
MD5 | 877b382935d230d714cf70e501180da0 |
|
BLAKE2b-256 | fe9b5b835ad347f183be991a34ee0329399d3ec229bb2fe9bb206b2a10523598 |