{"id":17873968,"url":"https://github.com/nigma/django-infinite-pagination","last_synced_at":"2025-03-21T22:31:40.999Z","repository":{"id":3536508,"uuid":"4596272","full_name":"nigma/django-infinite-pagination","owner":"nigma","description":"Efficiently paginate large object collections","archived":false,"fork":false,"pushed_at":"2019-05-01T20:00:05.000Z","size":167,"stargazers_count":26,"open_issues_count":4,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T05:43:55.854Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nigma.png","metadata":{"files":{"readme":"README.rst","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-06-08T10:40:52.000Z","updated_at":"2024-01-17T18:15:29.000Z","dependencies_parsed_at":"2022-09-14T08:41:31.429Z","dependency_job_id":null,"html_url":"https://github.com/nigma/django-infinite-pagination","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigma%2Fdjango-infinite-pagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigma%2Fdjango-infinite-pagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigma%2Fdjango-infinite-pagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigma%2Fdjango-infinite-pagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nigma","download_url":"https://codeload.github.com/nigma/django-infinite-pagination/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244880280,"owners_count":20525505,"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":[],"created_at":"2024-10-28T11:07:07.782Z","updated_at":"2025-03-21T22:31:40.568Z","avatar_url":"https://github.com/nigma.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Infinite Pagination for Django\n==============================\n\nThis is a very simple helper for Django 1.4 that does one thing: efficiently\npaginates large object collections on systems where using standard Django\nPaginator is impractical because of significant ``count(*)`` query\noverhead (i.e. PostgreSQL).\n\nUnder the hood it uses a single query to retrieve objects for the current page\nand check for availability of a successive page.\n\nThe ``InfinitePaginator`` is a replacement for Django\n``django.core.paginator.Paginator``.\n\nQuick Start\n-----------\n\nInclude ``django-infinite-pagination`` in your requirements file\n(or ``pip install django-infinite-pagination``) and add ``infinite_pagination``\nto ``INSTALLED APPS``.\n\nThen set the ``paginator_class`` attribute of your ``ListView``-based view to\n``InfinitePaginator`` and specify ``paginate_by`` attribute::\n\n    class ArticleListView(ListView):\n        model = Article\n        paginate_by = 10\n        paginator_class = InfinitePaginator\n\nTo display pagination links in a template load the ``infinite_pagination``\ntemplate tags and put ``{% paginate %}`` in the place you would like the\npagination links to show up::\n\n    {% load infinite_pagination %}\n\n    {% for object in object_list %}\n        {{ object }}\n    {% endfor %}\n\n    {% paginate %}\n\n\nA generic ``pagination/infinite_pagination.html`` template that works well with\nTwitter Bootstrap stylesheet is provided by this application. Adjust it to your\nrequirements.\n\nPaginating in Templates\n-----------------------\n\nSometimes application views cannot be modified and the pagination can only be\ndone at the template level. The ``autopaginate`` template tag is provided\nas a last resort of applying pagination to object lists inside templates::\n\n    {% load infinite_pagination %}\n\n    {% autopaginate object_list per_page=10 as paginated_list %}\n\n    {% for object in paginated_list %}\n        {{ object }}\n    {% endfor %}\n\n    {% paginate %}\n\n\nThe ``autopaginate`` tag takes a queryset and a number of items per page\nas input and returns a page slice for displaying in a template. Current page\nnumber is retrieved from template context or ``page`` request GET params.\nIt can also be specified as an optional tag param::\n\n    {% autopaginate object_list per_page=10 page=2 as paginated_list %}\n\nThe tag also sets ``paginator`` and ``page_obj`` template context variables for\nthe ``paginate`` tag that uses them to render navigation links.\n\nLicense\n-------\n\n`django-infinite-pagination` is released under the BSD license.\n\nOther Resources\n---------------\n\n- `GitHub repository \u003chttps://github.com/nigma/django-infinite-pagination\u003e`_\n- `PyPi Package site \u003chttp://pypi.python.org/pypi/django-infinite-pagination\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigma%2Fdjango-infinite-pagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnigma%2Fdjango-infinite-pagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigma%2Fdjango-infinite-pagination/lists"}