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
- [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.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Creating a ViewSet with Django1m 2s
-
(Locked)
Displaying a list of items with React2m 47s
-
Deleting an item using React and Django1m 49s
-
(Locked)
Partially updating an item using React1m 50s
-
(Locked)
Pagination with Django38s
-
(Locked)
Pagination with React3m 31s
-
(Locked)
Filtering with Django1m 56s
-
(Locked)
Filtering with React4m 44s
-
-
-
-
-