Simple and Easiest paginator for Django.
Project description
Django Leafage
Description
Simple and Easiest paginator for Django.
Installation
pip install django-leafage
Quick start
-
Add "leafage" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [ ... 'leafage', ]
-
In views
import leafage
like this::import leafage def home(request): """ Home page handler. """ template = 'home.html' per_page_obj = 10 # default = 10(if not provided) queryset = Model.objects.all() queryset = leafage.pagination(request=request, obj_list=queryset, obj_count=per_page_obj) context = { 'queryset': queryset } return render(request, template, context)
-
End of template look like this.
{% with obj_list=queryset %} {% include 'paginator.tpl' %} {% endwith %}
Licence
Copyright (c) 2020 Nilesh Kumar Dubey
This repository is licensed under the MIT license. See LICENSE for details
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
django-leafage-0.3.4.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for django_leafage-0.3.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65941a640f37cc641c15d403c4eae30317711dd600a0837cfb6f97f96c2f2805 |
|
MD5 | b982625c8be1cc5fdb867cd2702e68cc |
|
BLAKE2b-256 | 32b3985abbf7bbc156a73ef8fb720f2427da98453008375cd8c86f31689bd8ee |