{"id":14972901,"url":"https://github.com/joe513/django-cool-pagination","last_synced_at":"2025-10-26T20:32:22.911Z","repository":{"id":57419537,"uuid":"127622267","full_name":"joe513/django-cool-pagination","owner":"joe513","description":":anchor:Simple pagination app that saves your time.","archived":false,"fork":false,"pushed_at":"2020-03-09T06:56:41.000Z","size":59,"stargazers_count":10,"open_issues_count":7,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-10-30T06:23:44.829Z","etag":null,"topics":["bootstrap","bootstrap4","django","django-application","pagination","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/django-cool-pagination/","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/joe513.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":"2018-04-01T11:15:46.000Z","updated_at":"2020-03-09T06:56:43.000Z","dependencies_parsed_at":"2022-09-13T07:23:44.606Z","dependency_job_id":null,"html_url":"https://github.com/joe513/django-cool-pagination","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joe513%2Fdjango-cool-pagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joe513%2Fdjango-cool-pagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joe513%2Fdjango-cool-pagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joe513%2Fdjango-cool-pagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joe513","download_url":"https://codeload.github.com/joe513/django-cool-pagination/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238397226,"owners_count":19465136,"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","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","bootstrap4","django","django-application","pagination","python"],"created_at":"2024-09-24T13:47:43.142Z","updated_at":"2025-10-26T20:32:17.613Z","avatar_url":"https://github.com/joe513.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-cool-pagination\n\n[![Build Status](https://travis-ci.org/joe513/django-cool-pagination.svg?branch=master)](https://travis-ci.org/joe513/django-cool-pagination)\n[![Coverage Status](https://coveralls.io/repos/github/joe513/django-cool-pagination/badge.svg?branch=master)](https://coveralls.io/github/joe513/django-cool-pagination?branch=master)\n[![PyPI version](https://badge.fury.io/py/django-cool-pagination.svg)](https://badge.fury.io/py/django-cool-pagination)\n\n*django-cool-pagination* is simple pagination app that saves your time.\n\n\u003cp align=\"center\" \u003e\n\n![Usage Example](https://media.giphy.com/media/325f9CboTX86Eqa6he/giphy.gif)\n\u003c/p\u003e\n\n## Prerequisites\nCurrently it supports Bootstrap 4.x only. So that you have to add [Bootstrap 4](https://getbootstrap.com/docs/4.1/getting-started/download) to your project. \u003cbr/\u003e\n\n## Features \n\n   - _Dynamic query string creation_\n   - _Length auto control_\n   - _Fully customizable_ (aspiring)\n\n## Installation\n### Installing\n#### pip\n    pip install django-cool-pagination\n#### setup.py\n    git clone https://github.com/joe513/django-cool-pagination.git\n    cd django-cool-pagination\n    python setup.py install\n### Setting up\n#### Add to `INSTALLED_APPS`\n    INSTALLED_APPS = [\n        'django.contrib.admin',\n        'django.contrib.auth',\n        'django.contrib.contenttypes',\n        'django.contrib.sessions',\n        'django.contrib.messages',\n        'django.contrib.staticfiles',\n        \n        'django_cool_paginator'\n#### Make sure `request` is in `context_processors`\n        'context_processors': [\n                    'django.template.context_processors.debug',\n                    'django.template.context_processors.request',\n                    'django.contrib.auth.context_processors.auth',\n                    'django.contrib.messages.context_processors.messages',\n\n## Using\n\n### View\n#### FBV (Function based view)\n\n    def listing(request):\n        contact_list = Contact.objects.all()\n        paginator = Paginator(contact_list, 25)\n\n        page = request.GET.get('page')\n        page_obj = paginator.get_page(page)\n        return render(request, 'list.html', {'page_obj': page_obj})\n\n#### CBV (Class based view)\n\n    class Listing(ListView):\n        model = Item\n        paginate_by = 5\n\n### Template\n    {% load cool_paginate %}\n    \n    {% for contact in page_obj %}\n        ...\n    {% endfor %}\n    \n    {% cool_paginate page_obj=ENTER HERE YOUR PAGE OBJECT! %}\n\n\u003e **Note:**\nYou don't have to specify `page` if its name is `page_obj` as default.\n\n## Customization\nYou can customize it so that it works as you want. Customize it by defining settings either in setting.py or \ninside of `{% cool_paginate %} `\n\n#### setting.py\n\n`COOL_PAGINATOR_NEXT_NAME` - Name for \"next\" button in pagination bar. \u003cbr/\u003e\n`COOL_PAGINATOR_PREVIOUS_NAME` - Name for \"previous\" button in pagination bar \u003cbr/\u003e\n`COOL_PAGINATOR_SIZE` - Size of pagination bar (choose: \"LARGE\" or \"SMALL\") \u003cbr/\u003e\n`COOL_PAGINATOR_ELASTIC` - What page width is elastic mode enabled from?\n\n#### {% cool_paginate page_obj next_name previous_name size elastic %}\n`page_obj` - Type here your page object. \u003cbr/\u003e\n`next_name` - Name for \"next\" button in pagination bar. \u003cbr/\u003e\n`previous_name` - Name for \"previous\" button in pagination bar \u003cbr/\u003e\n`size` - Size of pagination bar (choose: \"LARGE\" or \"SMALL\") \u003cbr/\u003e\n`elastic` - What page width is elastic mode enabled from?\n\n\u003e **Note:**\n\u003e `{% cool_paginate %}` has a priority, _django-cool-pagination_ will firstly look at this, after at setting.py\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details\n\u003chr/\u003e\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoe513%2Fdjango-cool-pagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoe513%2Fdjango-cool-pagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoe513%2Fdjango-cool-pagination/lists"}