A Django app to paginate querysets faster.
Project description
Fast Paginator for Django
Simple speedy pagination over your large database tables.
Features
Simple Integration
FastPaginator API is compatible with Django's built-in pagination library. Only change your import statements then you're ready.
Better SQL Queries
Django's built-in pagination system builds SQL queries that have offset and limit clauses. FastPagination does not use them.
Built-in Cache System
FastPaginator has a built-in cache system. It does not cache QuerySets but caches primary keys of object lists. This provides speedup for pagination progress.
Quick Start
- Add "fast_pagination" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
...
'fast_pagination'
]
- In Django settings, you can set FAST_PAGINATION_TIMEOUT variable to invalidate cache. Default value is 1 hour.
- In Django settings, you can set FAST_PAGINATION_PREFIX variable to use in cache keys. Default values is 'fastpagination'.
- Import FastPaginator like this:
from fast_pagination.helpers import FastPaginator
- Then, you are ready. All you have to do is give your queryset and number of entries when creating FastPaginator object.
To Run Tests
- Create a dummy project.
- Run following command.
./manage.py test fast_pagination.tests
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 django-fast-paginator-1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 297f02864a298eda7e1300b09af4b1d8dbbef4a666b33c024d94a92d3ce1086c |
|
MD5 | ad3c57b98a82e744085630b40ab71013 |
|
BLAKE2b-256 | 6416a179d8b01b5c24f8f315e7f05ab6dbaf10c01795322c325f8f390938d690 |