[Solved]-Django Pagination Display Issue: all the page numbers show up

4๐Ÿ‘

โœ…

I have used the โ€œPaginator Tagโ€ with success to achieve the style of pagination you are looking for (often called โ€œDigg-styleโ€ pagination). Usage is explained in the article โ€œA Recipe for Pagination in Djangoโ€œ.

๐Ÿ‘คuser635090

1๐Ÿ‘

I have used the following package, and it is nice and simple to use.
https://github.com/jamespacileo/django-pure-pagination

It solves the common issue of not displaying every single page in the template, but rather showing a range.

enter image description here

The setting make such an implementation very easy:

PAGINATION_SETTINGS = {
    'PAGE_RANGE_DISPLAYED': 10,
    'MARGIN_PAGES_DISPLAYED': 2,

    'SHOW_FIRST_PAGE_WHEN_INVALID': True,
}
๐Ÿ‘คAvi Kaminetzky

Leave a comment