From the course: Building React and Django Apps

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Pagination with Django

Pagination with Django

From the course: Building React and Django Apps

Start my 1-month free trial

Pagination with Django

- [Instructor] Django REST framework provides multiple ways of paginating lists of items. There are three ways to do this with LimitOffset, Cursor, and PageNumber. We're going to keep things simple and use PageNumber pagination. We create a subclass called PackagePagination and we set the page size to nine, so we have a nice grid pattern on the front end. Then, in the PublicPackageViewSet, we set the pagination class to PackagePagination, and we're all done.

Contents