Skip to main content

Django Leafage

Description

Simple and Easiest paginator for Django.

Installation

pip install django-leafage

Quick start

  1. Add "leafage" to your INSTALLED_APPS in settings.py like this::

    INSTALLED_APPS = [
        ...
        'leafage',
        ...
    ]
    
  2. Ensure "APP_DIRS" to "True" in settings.py like this::

    TEMPLATES = [
        {
            ...
            'DIRS': [],
            'APP_DIRS': True,
            ...
        },
    ]
    
  3. 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)
    
    
  4. At beginning of template include following code and template look like this::

    {% load leafage %}
    
  5. 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

Metadata

Release files for django-leafage 1.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-leafage 1.2.5
File Size Uploaded Provenance
django-leafage-1.2.5.tar.gz 5.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-leafage 1.2.5
File Interpreter ABI Platform
django_leafage-1.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 13.0 kB

Release files / django-leafage-1.2.5.tar.gz

Download URL django-leafage-1.2.5.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
116980c76df49501278a89efc5fecc0bbecb5c53edb32c49cfe6e0447487447e
BLAKE2b-256 checksum
How to use checksums
aceae6e695a4548ee783e7d345ff4d75d071ca29d3b296a3892b06e639bfc06b
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / django_leafage-1.2.5-py3-none-any.whl

Download URL django_leafage-1.2.5-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ad9bd669d6f7e21a9d291d68ac76d6ad02e488f53965e3599b2067ca3700f34
BLAKE2b-256 checksum
How to use checksums
c96d5e40b06b3b5cb25eb1b830edf5f09343d44b1bd2f2aa3fa5ed562f7a5ad2
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for django-leafage 1.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page