Вопрос

I have the pagination module working for the most part but there's one issue. How can I only show a slice of the total available pages. For example, let's say I'm on page 5 of n pages, I'd want to show.

1,2,3,4,5,6....(n-1)(n).

I believe that Ruby has some fancy front-end magic to accomplish this. Is there anything that I can do within the django module?

From looking at other sites, it seems as though the logic basically goes, pick a fixed number of spots. If that number is larger than the amount currently display, add items when users page forward. Once that number of spots is reached, only show x spots to the left and right of the current page.

Should I just write my own template logic to accomplish that?

Thanks

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top