Skip to main content

ckanext-resource-pagination

A CKAN extension that adds pagination to the resource list on dataset pages.

CKAN renders every resource on a single page by default. For datasets with hundreds or thousands of resources, this crashes the browser and makes pages unusable. This plugin paginates the resource list with configurable page sizes and Bootstrap 5 navigation controls.

Features

  • Paginates the resource list on dataset detail pages (/dataset/<id>)
  • Configurable number of resources per page (default: 50)
  • Only processes visible resources (skips resource_view_list calls for off-page resources)
  • Bootstrap 5 pagination controls with windowed page numbers
  • "Showing X-Y of Z resources" counter
  • Works with all dataset types
  • No database changes or migrations required

Requirements

  • CKAN 2.11+
  • Python 3.8+

Installation

pip install ckanext-resource-pagination

Add resource_pagination to ckan.plugins in your ckan.ini:

ckan.plugins = ... resource_pagination

Restart CKAN.

Configuration

Setting Default Description
ckanext.resource_pagination.per_page 50 Number of resources to show per page

Example:

ckanext.resource_pagination.per_page = 25

How it works

The plugin registers a Flask blueprint via IBlueprint that intercepts the dataset read route (/dataset/<id>). The view:

  1. Calls package_show to fetch the dataset (standard CKAN behavior)
  2. Reads the resource_page query parameter from the URL
  3. Slices the resources list to the configured page size
  4. Only calls resource_view_list on visible resources
  5. Passes pagination metadata to the template

The plugin also overrides package/read.html and package/snippets/resources_list.html to render the sliced resource list with pagination controls.

License

AGPL-3.0

Metadata

Release files for ckanext-resource-pagination 0.2.3

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

Source distribution (sdist)

Source distribution for ckanext-resource-pagination 0.2.3
File Size Uploaded Provenance
ckanext_resource_pagination-0.2.3.tar.gz 3.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ckanext-resource-pagination 0.2.3
File Interpreter ABI Platform
ckanext_resource_pagination-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / ckanext_resource_pagination-0.2.3.tar.gz

Download URL ckanext_resource_pagination-0.2.3.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0ccecaa4b5585163c4d0e344c43fe174740b8206180e48b41a4226155df26543
BLAKE2b-256 checksum
How to use checksums
c2a20c6376ae299e4087f11ffe5f79a608e0b9556163bde7ccaceaf1b9f3facc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / ckanext_resource_pagination-0.2.3-py3-none-any.whl

Download URL ckanext_resource_pagination-0.2.3-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8634423313e140cf82ea94dcbaff0879155e04e00aa30ed386ec1e0a4205886d
BLAKE2b-256 checksum
How to use checksums
f93abb026a45f59b1b3ffcf47b2615ec94b6429eb194a57e3df1c2943df8de82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Security for ckanext-resource-pagination 0.2.3

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