filmov
tv
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:
▶️ Full Playlist:
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
#django #python #webpack #frontend
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
Комментарии