Pagination and Class Based Views (Django Rest framework)

preview_player
Показать описание

This video is EXTREMELY IMPORTANT!

If you're building a rest api you always need to implement a pagination system. When other technologies interact with your api, you must have some kind of pagination.

In this video I show you how to use django rest framework class based views to paginate results from the SQLite database.

The class based view we use is ApiListView.

#djangorestframework #restapi

Рекомендации по теме
Комментарии
Автор

Thank you Mitch, You are amazing!
Django Rest Framework series was really very informative. I was looking for tutorial on DRF with function based views and here I got it.
Got to learn so many things. Thank you so much for taking your precious time and doing these kinda tutorials. Really much appreciated.
Hoping for some more tutorials on advanced topic on Django Rest Framework such as generic views, viewsets, how the class based views work behind the scenes and more :)

aashayamballi
Автор

I am really shoked that you have over 20K views for this amazing content and less than 300 likes, man please keep up the great videos I really enjoy your way of explaining stuff. Wish you all the best bud!❤👌

hamzasabri
Автор

You are extremely good Sir. I am benefited from you.

thanaungkyow
Автор

Thanks a lot, very clear illustration.

islamh
Автор

Dude you just saved my job by ths video....loads of love and respect

I am getting just one issue in authentication part
It's showing not authenticated?

Any idea?

mohitmishra
Автор

Hey Mitch, I’m not able to use the query parameter page like you did. Is there something that needs to be added?

hardipinder
Автор

Hey great job. Just curious what are you using for your frontend. Which is the frontend tech that is calling the drf?

amiaynarayan
Автор

Is there a way to send page size as well in query param as we send page number 'page=2' ?

sshinkar
Автор

Small correction, if I'm not wrong the count number is the total number of records not the total number of pages

cmunozvideos
Автор

Great tutorial.
How can I remove pagination from specified class viewed?

RichellyItalo
Автор

Hi Mitch,

Great video. I've learned a lot from your courses.

One question. If use class based views. How to specify different authentication methods for different http methods under the same class based view? Say TokenAuthentication for GET, and AllowAny for POST?

Thanks,
Xiankun

xiankunxu
Автор

I am getting issue wth the authentication part ?
Anyone got any update?

mohitmishra
Автор

Thanks for the great tutorial! But what if we want to display blog post of the logged user? Because as I tried this, it displays all the data from the database and not just the data from the logged user.

ivonherms
Автор

Those are not Lists, those are Tuples. :P

gagandeep
Автор

I think the count is how many items not how many pages

menkiguo