Display just 10 pages for pagination with django

Im working on a django pagination and its okay but next and previous buttons in django pagination just skip 1 page. I want that django pagination show number 1 to 10 pages for pagination at first and then when i click on next button it goes to page 11 and shows another 10 numbers, 11 to 20. And when i click on next again it goes to page 21 and shows numbers 21 to 30. And it would be the same for previous button. How to make django pagination like that?

Back to Top