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

Описание к видео Django-Filter - Filtering Django Querysets, Class-Based Views and REST Framework Integration

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:
https://ko-fi.com/bugbytes

▶️ Full Playlist:
   • Django Primers  

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://bugbytes.io/posts/
👾 Github: https://github.com/bugbytes-io/
🐦 Twitter:   / bugbytesio  

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
django-filter docs: https://django-filter.readthedocs.io/...
django-filter FilterSet: https://django-filter.readthedocs.io/...
Django choices: https://docs.djangoproject.com/en/4.1...

#django #python #webpack #frontend

Комментарии

Информация по комментариям в разработке