Django-Filter - Filtering Django Querysets, Class-Based Views and REST Framework Integration

preview_player
Показать описание
In this video, we'll learn about the very useful Django Filter package, which allows you to extract filtering logic for your querysets into dedicated classes, called FilterSets.

We'll go over an example of filtering a list of books, using a FilterSet, and will demonstrate how to use Django-Filter with functional and class-based views.

We'll also demonstrate django-filter integration with Django REST Framework.

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:47 Building Django Models
03:21 Creating Form to Filter Books
06:23 Adding Books to Database with Management Command
08:17 Filtering Books from GET request parameters
10:34 Installing django-filter
10:46 Creating a FilterSet class
14:47 Customizing FilterSet lookup expressions
17:30 Defining a RangeFilter for the price field
18:22 Using FilterSets in Class-Based Views
21:51 Integrating FilterSets with Django REST Framework

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:

▶️ Full Playlist:

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:

#django #python #webpack #frontend
Рекомендации по теме
Комментарии
Автор

Always surprising with content of quality. Thank you for all mate.

seydinaoumarsamabaly
Автор

I appreciate your so clear and awesome tutorial!

samwang
Автор

very great explanations, simple and clear! I love your videos!

calimhiro
Автор

I needed this video so much! Thanks so much for making all of your videos!

helloh
Автор

Straight to the point and very informational. Loved it!

garzuze
Автор

Thank you for your example. this is very helpful to me!

frankyang
Автор

Great video. Really clearly explained how and why. Looking forward to watching more of your channel.

johnchiverton
Автор

I really really love this channel ... I have learned in 15 mins what could have taken me an hour in other videos and your explanations are excellent and concise. Thank you.

Davidkiania
Автор

covering all the related features nicely with ease, great job, expecting something for the full text search also, thank u!!!

arunima
Автор

Thank you, this tutorial helped me very much. I was basing my stuff on another django tutorial of filter search but it was outdated, started new with this one and everything works. All the best 😃

metalhoe
Автор

For me, the best Channel with a big C. Thanks

axelb.
Автор

As always, your videos are super useful

Автор

Wonderful. This is really incredible. Keep it up man. Expecting more from you on Django-Unicorn

AmoahDevLabs
Автор

It was so helpful and useful and also taught simply👏
Thanks a lot 🙏😊

wqmszcm
Автор

it's so helpful . Thank You so Much (Subscribed)

developer-pffl
Автор

You're cool!!!! I just have thought about rest and you start to talk about it))))

Developer_python_
Автор

After 3 days of trying, by this video my problem is solved :D

ekurqim
Автор

I would put your video on the docs instead of official documentation. Thank you.

hckphy
Автор

Great content!. Thanks for all your high Q vids. Is it possible to search for, let's say, multiple genres?

torbjornsvard
Автор

How to style the dropdown filter to bootstraps class (or any class) e.g. model-form. Some use Crispy Forms but it would be good to have a way to add a html class. For forms it's straight forward but for the filter generated fields+buttons I haven't manage to do it. Any tips/advice? Great video thanks for posting keep it up.

svink