2,696 views
In this video I will show you how to implement pagination, do the HTML part and also deal with possible errors that the user may cause. Our glue of Properties and Methods: Properties: -- number: Current page number -- paginator.num_pages: Total number of pages -- paginator.count: Total number of records -- paginator.per_page: Number of records per page -- paginator.page_range: list of pages Methods -- has_next: If there is a next page -- has_previous: If there is a previous page -- previous_page_number: The number of the previous page -- next_page_number: The number of the next page ???????? Want to be my friend on social media? ???????? ✅ LinkedIn: / samuel-gon%c3%a7alves-822648129 ✅ Instagram: / samuelgoncalves.tech ✅ GitHub: https://github.com/fgsamuel ✅ Twitter: / samuel_f_g To make your life easier: 0:00 Introduction 0: 18 Demonstration of what we will do in class 1:47 Structure used for the example 2:54 Add the paging object to the view 5:17 Parameterize the paging data 8:28 Handling possible errors in requests 16:25 Changing the HTML for the user choose the page 18:30 Placing the features in the html 19:32 Main properties and methods of Paginator 20:25 Continuing to place the features in the html 32:06 Allow the user to choose how many items per page 39:40 Correcting the change error the quantity per page when changing pages 42:52 Adding information on the screen about pagination