Skip to main content

This package helps in paginating evaluated querysets

Project description

Evaluated Queryset Paginator

This python package has been developed in order to overcome the issues of the default django.core.Paginator which does not paginate the evaluate query sets properly.

Functions

  • __init__() Constructor of the class which takes two parameters as input:

    1. query_set: The entire query set that needs to be paginated
    2. objects_per_page: The number of objects that are required for each page
  • paginate() This function is called by the constructor by default and performs the main task of forming the pages

  • page() Input parameters- page_number and returns the total number of pages generated

Exceptions

  • EmptyPageException This Exception is raised when the objects_per_page value passed is 0

  • EmptyQuerysetException This Exception is raised when the total number of objects in the query_set is 0

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

QuerysetPaginator-0.0.2.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

QuerysetPaginator-0.0.2-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page