Skip to main content

A reusable Django pagination component with modern, clean styling and interactive JavaScript behavior

Project description

Django Pagination Widget

A modern, zero-dependency Django pagination component with clean styling, accessible markup, and a tiny vanilla-JS helper for smart ellipsis.

Supports: Django 4.2+ (CI covers 4.2 [LTS], 5.0, 5.1, 5.2 [LTS]) · Python 3.8–3.13

Install

pip install django-pagination-widget

Quick start

  1. Add the app
INSTALLED_APPS = [
	# ...
	"django_pagination_widget",
]
  1. In your template
{% load pagination_tags %}

<!-- Basic usage (widget auto-includes its CSS/JS) -->
{% pagination_widget page_obj %}

<!-- Or load assets once (e.g., in base.html) and reuse the widget -->
{% pagination_css %}
{% pagination_js %}
{% pagination_widget page_obj %}

<!-- Or render the widget “bare” (skip auto-included assets) -->
{% pagination_widget page_obj include_assets=False %}

Optional: include your own theme overrides

{% pagination_custom_css 'css/pagination_widget.css' %}

Global default for “bare” mode (optional):

```python
PAGINATION_WIDGET = {
	"INCLUDE_ASSETS_BY_DEFAULT": False,
}

## Links

- Source: https://github.com/priyesh-04/django-pagination-widget
- Issues: https://github.com/priyesh-04/django-pagination-widget/issues

License: MIT

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

django_pagination_widget-0.1.2.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_pagination_widget-0.1.2-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file django_pagination_widget-0.1.2.tar.gz.

File metadata

File hashes

Hashes for django_pagination_widget-0.1.2.tar.gz
Algorithm Hash digest
SHA256 62641c488f927eb662dbbb768fb9fbc8577ca0c0211d8cb26866356758b933a3
MD5 570c3aeb2991c40f03b5092d41a8e224
BLAKE2b-256 3fe35b1f0107bebb30efbbe21ead1dc836644eacadf7b733da9d2a80e2b3963a

See more details on using hashes here.

File details

Details for the file django_pagination_widget-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_pagination_widget-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cbe2fbad903b8f07f973aaa34482dbcefecd383bee049044e6419a347edcbec0
MD5 6e508936987f325fe6a6da416865222e
BLAKE2b-256 d9f73a00f3813458431c3c115b95b95d1fd113666342d276b4eb5ac2c7e2cb59

See more details on using hashes here.

Supported by

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