{"id":13419765,"url":"https://github.com/jmcclell/django-bootstrap-pagination","last_synced_at":"2025-10-01T20:32:19.775Z","repository":{"id":2686601,"uuid":"3679312","full_name":"jmcclell/django-bootstrap-pagination","owner":"jmcclell","description":"Django template tag for rendering Page objects as Bootstrap pagination HTML","archived":true,"fork":false,"pushed_at":"2021-04-16T20:16:22.000Z","size":103,"stargazers_count":213,"open_issues_count":4,"forks_count":85,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-09-22T12:59:44.372Z","etag":null,"topics":["bootstrap","bootstrap-3","bootstrap-4","bootstrap-pagination","django","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmcclell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-10T12:22:33.000Z","updated_at":"2025-03-06T17:45:34.000Z","dependencies_parsed_at":"2022-09-13T03:02:49.339Z","dependency_job_id":null,"html_url":"https://github.com/jmcclell/django-bootstrap-pagination","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/jmcclell/django-bootstrap-pagination","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcclell%2Fdjango-bootstrap-pagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcclell%2Fdjango-bootstrap-pagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcclell%2Fdjango-bootstrap-pagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcclell%2Fdjango-bootstrap-pagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmcclell","download_url":"https://codeload.github.com/jmcclell/django-bootstrap-pagination/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmcclell%2Fdjango-bootstrap-pagination/sbom","scorecard":{"id":524124,"data":{"date":"2025-08-11","repo":{"name":"github.com/jmcclell/django-bootstrap-pagination","commit":"46e76ef1dc1025778ea11e467ece634fdbfaf871"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'","Warn: branch protection not enabled for branch '1.0.x'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"47 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2014-5 / GHSA-296w-6qhq-gf92","Warn: Project is vulnerable to: PYSEC-2011-2 / GHSA-3jqw-crqj-w8qw","Warn: Project is vulnerable to: PYSEC-2012-3 / GHSA-59w8-4wm2-4xw8","Warn: Project is vulnerable to: PYSEC-2012-4 / GHSA-5h2q-4hrp-v9rr","Warn: Project is vulnerable to: PYSEC-2011-10 / GHSA-5j2h-h5hg-3wf8","Warn: Project is vulnerable to: PYSEC-2014-6 / GHSA-625g-gx8c-xcmg","Warn: Project is vulnerable to: PYSEC-2015-8 / GHSA-6565-fg86-6jcx","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: PYSEC-2012-2 / GHSA-78vx-ggch-wghm","Warn: Project is vulnerable to: PYSEC-2015-9 / GHSA-7fq8-4pv5-5w5c","Warn: Project is vulnerable to: PYSEC-2011-12 / GHSA-7g9h-c88w-r7h2","Warn: Project is vulnerable to: PYSEC-2015-4 / GHSA-7qfw-j7hp-v45g","Warn: Project is vulnerable to: PYSEC-2011-9 / GHSA-7wph-fc4w-wqp2","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: PYSEC-2014-2 / GHSA-89hj-xfx5-7q66","Warn: Project is vulnerable to: PYSEC-2011-11 / GHSA-8m3r-rv5g-fcpq","Warn: Project is vulnerable to: GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2016-2 / GHSA-c8c8-9472-w52h","Warn: Project is vulnerable to: PYSEC-2016-3 / GHSA-crhm-qpjc-cm64","Warn: Project is vulnerable to: PYSEC-2014-4 / GHSA-f7cm-ccfp-3q4r","Warn: Project is vulnerable to: PYSEC-2016-16 / GHSA-fp6p-5xvw-m74f","Warn: Project is vulnerable to: PYSEC-2011-8 / GHSA-fwr5-q9rx-294f","Warn: Project is vulnerable to: PYSEC-2010-12 / GHSA-fxpg-gg9g-76gj","Warn: Project is vulnerable to: PYSEC-2015-5 / GHSA-gv98-g628-m9x5","Warn: Project is vulnerable to: PYSEC-2015-20 / GHSA-h582-2pch-3xv3","Warn: Project is vulnerable to: PYSEC-2011-5 / GHSA-h95j-h2rv-qrg4","Warn: Project is vulnerable to: GHSA-hmr4-m2h5-33qx","Warn: Project is vulnerable to: PYSEC-2015-6 / GHSA-jhjg-w2cp-5j44","Warn: Project is vulnerable to: PYSEC-2016-15 / GHSA-pw27-w7w4-9qc7","Warn: Project is vulnerable to: PYSEC-2015-10 / GHSA-q5qw-4364-5hhm","Warn: Project is vulnerable to: PYSEC-2011-4 / GHSA-rm2j-x595-q9cj","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2014-1 / GHSA-rvq6-mrpv-m6rm","Warn: Project is vulnerable to: PYSEC-2014-7 / GHSA-rw75-m7gp-92m3","Warn: Project is vulnerable to: PYSEC-2019-16 / GHSA-vfq6-hq5r-27r6","Warn: Project is vulnerable to: PYSEC-2014-3 / GHSA-wqjj-hx84-v449","Warn: Project is vulnerable to: PYSEC-2011-3 / GHSA-wxg3-mfph-qg9w","Warn: Project is vulnerable to: PYSEC-2011-1 / GHSA-x88j-93vc-wpmp","Warn: Project is vulnerable to: PYSEC-2015-11","Warn: Project is vulnerable to: PYSEC-2015-7","Warn: Project is vulnerable to: PYSEC-2016-18","Warn: Project is vulnerable to: GHSA-55x5-fj6c-h6m8","Warn: Project is vulnerable to: PYSEC-2014-9 / GHSA-57qw-cc2g-pv5p","Warn: Project is vulnerable to: PYSEC-2021-19 / GHSA-jq4v-f5q6-mjqq","Warn: Project is vulnerable to: GHSA-pgww-xf46-h92r","Warn: Project is vulnerable to: PYSEC-2022-230 / GHSA-wrxv-2j5q-m38w","Warn: Project is vulnerable to: PYSEC-2018-12 / GHSA-xp26-p53h-6h2p"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T03:54:36.408Z","repository_id":2686601,"created_at":"2025-08-20T03:54:36.408Z","updated_at":"2025-08-20T03:54:36.408Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277455242,"owners_count":25820680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-29T02:00:09.175Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","bootstrap-3","bootstrap-4","bootstrap-pagination","django","python"],"created_at":"2024-07-30T22:01:20.527Z","updated_at":"2025-10-01T20:32:19.503Z","avatar_url":"https://github.com/jmcclell.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Project No Longer Maintained\n\nThis project lived a long and useful life, but it's been inactive for quite some time and I believe its relevancy has faded.\n\nIt will remain here on Github in a read-only, archived state but there will be no more updates.\n\n\n\n\n\n[![PyPi version](https://img.shields.io/pypi/v/django-bootstrap-pagination.svg)](https://pypi.python.org/pypi/django-bootstrap-pagination)\n[![PyPi downloads](https://img.shields.io/pypi/dm/django-bootstrap-pagination.svg)](https://pypi.python.org/pypi/django-bootstrap-pagination)\n[![Build Status](https://travis-ci.org/jmcclell/django-bootstrap-pagination.png?branch=master)](https://travis-ci.org/jmcclell/django-bootstrap-pagination)\n\n\n## Django Bootstrap Pagination\n\n*Bootstrap Compatibility*\n\n| Versions         | Bootstrap Versions  | Notes                                                  |\n| -----------------| ------------------- | -------------------------------------------------------|\n| \u003c 1.1.0          | 2.x                 |                                                        |\n| \u003e 1.1.0, \u003c 1.7.0 | 3.x                 |                                                        |\n| \u003e= 1.7.0         | 3.x, 4.x            | bootstrap_pager is only compatible with Bootstrap  3.x |\n\n\nThis application serves to make using Twitter's Bootstrap Pagination styles\nwork seamlessly with Django Page objects. By passing in a Page object and\none or more optional arguments, Bootstrap pagination bars and pagers can\nbe rendered with very little effort.\n\nCompatible with Django **1.2+**\n\n## Installation\n\n### PIP\n\nThis will install the latest stable release from PyPi.\n\n```\n    pip install django-bootstrap-pagination\n```\n\n### Download\n\nDownload the latest stable distribution from:\n\nhttp://pypi.python.org/pypi/django-bootstrap-pagination\n\nDownload the latest development version from:\n\ngithub @ http://www.github.com/jmcclell/django-bootstrap-pagination\n\n```\n    setup.py install\n```\n\n## Usage\n\n### Setup\n\nMake sure you include bootstrap_pagination in your installed_apps list in settings.py:\n\n```\n    INSTALLED_APPS = (\n        'bootstrap_pagination',\n    )\n```\n\nAdditionally, include the following snippet at the top of any template that makes use of\nthe pagination tags:\n\n```\n    {% load bootstrap_pagination %}\n```\n\nFinally, make sure that you have the request context processor enabled:\n\n```\n    # Django 1.8+\n    TEMPLATES = [\n        {\n            # ...\n            'OPTIONS': {\n                context_processors': [\n                    # ...\n                    'django.template.context_processors.request',\n                ]\n            }\n        }\n    ]\n\n    # Django \u003c 1.8\n    TEMPLATE_CONTEXT_PROCESSORS = {\n        \"django.core.context_processors.request\",\n    )\n```\n\n# bootstrap_paginate\n\n**All Optional Arguments**\n\n- **range** - Defines the maximum number of page links to show\n- **show_prev_next** - Boolean. Defines whether or not to show the Previous and Next\n                       links. (Accepts `\"true\"` or `\"false\"`)\n- **previous_label** - The label to use for the Previous link\n- **next_label** - The label to use for the Next link\n- **show_first_last** - Boolean. Defines whether or not to show the First and Last links.\n                       (Accepts `\"true\"` or `\"false\"`)\n- **first_label** - The label to use for the First page link\n- **last_label** - The label to use for the Last page link\n- **show_index_range** - Boolean, defaults to \"false\". If \"true\" shows index range of items instead of page numbers in the paginator. For example, if paginator is configured for 50 items per page, show_index_range=\"true\" will display [1-50, 51-100, **101-150**, 151-200, 201-250, etc.] rather than [1, 2, **3**, 4, 5, etc.].\n- **url_view_name** - A named URL reference (such as one that might get passed into the URL\n                      template tag) to use as the URL template. Must be resolvable by the\n                      `reverse()` function. **If this option is not specified, the tag simply\n                      uses a relative url such as `?page=1` which is fine in most situations**\n- **url_param_name** - Determines the name of the `GET` parameter for the page number. The\n                       default is `\"page\"`. If no **url_view_name** is defined, this string\n                       is appended to the url as `?{{url_param_name}}=1`.\n- **url_extra_args** - **Only valid when url_view_name is set.** Additional arguments to\n                       pass into `reverse()` to resolve the URL.\n- **url_extra_kwargs** - **Only valid when `url_view_name` is set.** Additional named\n                         arguments to pass into `reverse()` to resolve the URL. Additionally,\n                         the template tag will add an extra parameter to this for the\n                         page, as it is assumed that if given a url_name, the page will\n                         be a named variable in the URL regular expression. In this case,\n                         the `url_param_name` continues to be the string used to represent\n                         the name. That is, by default, `url_param_name` is equal to `page`\n                         and thus it is expected that there is a named `page` argument in the\n                         URL referenced by `url_view_name`. This allows us to use pretty\n                         pagination URLs such as `/page/1`\n- **extra_pagination_classes** - A space separated list of CSS class names that\n                             will be added to the top level `\u003cul\u003e` HTML element.\n                             In particular, this can be utilized in Bootstrap 4\n                             installations to add the appropriate alignment\n                             classes from Flexbox utilities: eg:\n                             `justify-content-center`\n\n\n**Basic Usage**\n\nThe following will show a pagination bar with a link to every page, a previous link, and a next link:\n\n```\n    {% bootstrap_paginate page_obj %}\n```\n\nThe following will show a pagination bar with at most 10 page links, a previous link, and a next link:\n\n```\n    {% bootstrap_paginate page_obj range=10 %}\n```\n\nThe following will show a pagination bar with at most 10 page links, a first page link, and a last page link:\n\n```\n    {% bootstrap_paginate page_obj range=10 show_prev_next=\"false\" show_first_last=\"true\" %}\n```\n\n**Advanced Usage**\n\nGiven a url configured such as:\n\n```python\n    archive_index_view = ArchiveIndexView.as_view(\n        date_field='date',\n        paginate_by=10,\n        allow_empty=True,\n        queryset=MyModel.all(),\n        template_name='example/archive.html'\n    )\n\n    urlpatterns = patterns(\n        'example.views',\n        url(r'^$', archive_index_view, name='archive_index'),\n        url(r'^page/(?P\u003cpage\u003e\\d+)/$', archive_index_view,\n            name='archive_index_paginated'))\n```\n\nWe could simply use the basic usage (appending ?page=#) with the *archive_index* URL above,\nas the *archive_index_view* class based generic view from django doesn't care how it gets\nthe page parameter. However, if we want pretty URLs, such as those defined in the\n*archive_index_paginated* URL (ie: /page/1), we need to define the URL in our template tag:\n\n```\n    {% bootstrap_paginate page_obj url_view_name=\"archive_index_paginated\" %}\n```\n\nBecause we are using a default page parameter name of \"page\" and our URL requires no other\nparameters, everything works as expected. If our URL required additional parameters, we\nwould pass them in using the optional arguments **url_extra_args** and **url_extra_kwargs**.\nLikewise, if our page parameter had a different name, we would pass in a different\n**url_param_name** argument to the template tag.\n\n# bootstrap_pager\n\nA much simpler implementation of the Bootstrap Pagination functionality is the Pager, which\nsimply provides a Previous and Next link.\n\n**All Optional Arguments**\n\n- **previous_label** - Defines the label for the Previous link\n- **next_label** - Defines the label for the Next link\n- **previous_title** - Defines the link title for the previous link\n- **next_title** - Defines the link title for the next link\n- **centered** - Boolean. Defines whether or not the links are centered. Defaults to false.\n                 (Accepts \"true\" or \"false\")\n- **url_view_name** - A named URL reference (such as one that might get passed into the URL\n                      template tag) to use as the URL template. Must be resolvable by the\n                      `reverse()` function. **If this option is not specified, the tag simply\n                      uses a relative url such as `?page=1` which is fine in most situations**\n- **url_param_name** - Determines the name of the `GET` parameter for the page number. Th\n                       default is `\"page\"`. If no `url_view_name` is defined, this string\n                       is appended to the url as `?{{url_param_name}}=1`.\n- **url_extra_args** - **Only valid when `url_view_name` is set.** Additional arguments to\n                       pass into `reverse()` to resolve the URL.\n- **url_extra_kwargs** - **Only valid when `url_view_name` is set.** Additional named\n                         arguments to pass into `reverse()` to resolve the URL. Additionally,\n                         the template tag will add an extra parameter to this for the\n                         page, as it is assumed that if given a url_name, the page will\n                         be a named variable in the URL regular expression. In this case,\n                         the `url_param_name` continues to be the string used to represent\n                         the name. That is, by default, `url_param_name` is equal to `\"page\"`\n                         and thus it is expected that there is a named `page` argument in the\n                         URL referenced by `url_view_name`. This allows us to use pretty\n                         pagination URLs such as `/page/1`\n- **url_anchor** - The anchor to use in URLs. Defaults to `None`\n- **extra_pager_classes** - A space separated list of CSS class names that will be added\n                to the top level `\u003cul\u003e` HTML element. This could be used to, as an\n                example, add a class  to prevent the pager from showing up when\n                printing.\n\n**Usage**\n\nUsage is basically the same as for bootstrap_paginate. The simplest usage is:\n\n```\n    {% bootstrap_pager page_obj %}\n```\n\nA somewhat more advanced usage might look like:\n\n```\n    {% bootstrap_pager page_obj previous_label=\"Newer Posts\" next_label=\"Older Posts\" url_view_name=\"post_archive_paginated\" %}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmcclell%2Fdjango-bootstrap-pagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmcclell%2Fdjango-bootstrap-pagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmcclell%2Fdjango-bootstrap-pagination/lists"}