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 in settings.py like this::
INSTALLED_APPS = [ ... 'leafage', ... ]
-
Ensure "APP_DIRS" to "True" in settings.py like this::
TEMPLATES = [ { ... 'DIRS': [], 'APP_DIRS': True, ... }, ]
-
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)
-
At beginning of template include following code and template look like this::
{% load leafage %}
-
End of template add following code look like this::
{% paginate request=request object_list=queryset %}
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-1.2.5.tar.gz
(5.4 kB
view details)
Built Distribution
File details
Details for the file django-leafage-1.2.5.tar.gz
.
File metadata
- Download URL: django-leafage-1.2.5.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 116980c76df49501278a89efc5fecc0bbecb5c53edb32c49cfe6e0447487447e |
|
MD5 | abda47ce8eefd8e42d191628bbde8e5c |
|
BLAKE2b-256 | aceae6e695a4548ee783e7d345ff4d75d071ca29d3b296a3892b06e639bfc06b |
File details
Details for the file django_leafage-1.2.5-py3-none-any.whl
.
File metadata
- Download URL: django_leafage-1.2.5-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ad9bd669d6f7e21a9d291d68ac76d6ad02e488f53965e3599b2067ca3700f34 |
|
MD5 | 0a73fe1c09880eddf805bc44109402ea |
|
BLAKE2b-256 | c96d5e40b06b3b5cb25eb1b830edf5f09343d44b1bd2f2aa3fa5ed562f7a5ad2 |