Skip to main content

A super-simple set of pagination tools for Django 1.8+

Project description

https://badge.fury.io/py/dj-paginator.png https://travis-ci.org/pydanny/dj-paginator.png?branch=master

A super-simple set of pagination tools for Django 1.8+

Documentation

The full documentation will soon be at https://dj-paginator.readthedocs.org.

Features

  • Super simple code base.

  • Easy to create and switch themes.

  • Really good documentation! (coming soon)

  • Really good tests! (coming soon)

  • Class-Based View mixin so you don’t need to load template tags (coming soon)

Quickstart

Install dj-paginator:

pip install dj-paginator

In your installed apps:

INSTALLED_APPS = [
    paginator
]

In your list view:

class MyListView(ListView):
    model = MyModel
    paginate_by = 10

In your list view template:

{% load paginator %}

{% paginator %}

Done!

Switching to a new theme method 1

# Currently defaults to bootstrap.
# I'll add foundation tomorrow.
PAGINATOR_THEME = 'foundation'

Switching to a new theme method 2

{% load paginator %}

{# Is the default #}
{% bootstrap_paginator %}

{# For when I add the foundation theme#}
{% foundation_paginator %}

History

0.2.0 (2015-07-27)

  • Porting of django-pagination’s main paginate function

  • Convert to pytest

0.1.0 (2015-07-26)

  • First release on PyPI.

  • Inception

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

dj-paginator-0.2.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

dj_paginator-0.2.0-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dj-paginator-0.2.0.tar.gz.

File metadata

File hashes

Hashes for dj-paginator-0.2.0.tar.gz
Algorithm Hash digest
SHA256 503e125d0381b5ca90f5606efbf6a1affc15f1515733df52a00b3340068bc8f8
MD5 56ca339481817a395513ae87e30e3931
BLAKE2b-256 2d9d06fb000fa9df4115e6d6ca871bd19c683bfdeb90ed3aaaac905ce54dbae1

See more details on using hashes here.

File details

Details for the file dj_paginator-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dj_paginator-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 43e6c8ccb75c5876b7686771e937244c7a5ff561b01d5d85bc8c3ab4e30a561d
MD5 203316551adfadc5926a0bd3419b1180
BLAKE2b-256 2c813c2b45bc13c974df6e68d496ee64bfd3d81820ecaa24c24fee6bf53941f2

See more details on using hashes here.

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