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.2.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for django_leafage-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46f43b4c3f0bea28f3d2f1d6122d76b4d33d90d9c7aab8b5b90b92cd1a3643be |
|
MD5 | aa6bc1e9278cceae01f454205cf1869f |
|
BLAKE2b-256 | a22df8677eed12680bac00a8ff670b411f2b106449756e0ea399be0cdcd2b73c |